Path 1: 24 calls (0.8)

If (24)

1@only_required_for_messages("confusing-consecutive-elif")
2    def visit_if(self, node: nodes.If) -> None:
3        body_ends_with_if = isinstance(
4            node.body[-1], nodes.If
5        ) and self._has_no_else_clause(node.body[-1])
6        if node.has_elif_block() and body_ends_with_if:
7            self.add_message("confusing-consecutive-elif", node=node.orelse[0])
            

Path 2: 3 calls (0.1)

If (3)

1@only_required_for_messages("confusing-consecutive-elif")
2    def visit_if(self, node: nodes.If) -> None:
3        body_ends_with_if = isinstance(
4            node.body[-1], nodes.If
5        ) and self._has_no_else_clause(node.body[-1])
6        if node.has_elif_block() and body_ends_with_if:
7            self.add_message("confusing-consecutive-elif", node=node.orelse[0])
            

Path 3: 3 calls (0.1)

If (3)

1@only_required_for_messages("confusing-consecutive-elif")
2    def visit_if(self, node: nodes.If) -> None:
3        body_ends_with_if = isinstance(
4            node.body[-1], nodes.If
5        ) and self._has_no_else_clause(node.body[-1])
6        if node.has_elif_block() and body_ends_with_if:
7            self.add_message("confusing-consecutive-elif", node=node.orelse[0])