def _check_simplifiable_if(self, node):
if self._is_actual_elif(node):<EOL><INDENT>return<EOL><DEDENT>if len(node.orelse) != <NUM_LIT:1> or len(node.body) != <NUM_LIT:1>:<EOL><INDENT>return<EOL><DEDENT>first_branch = node.body[<NUM_LIT:0>]<EOL>else_branch = node.orelse[<NUM_LIT:0>]<EOL>if isinstance(first_branch, astroid.Return):<EOL><INDENT>if not isinstance(else_branch, astroid.Return):<EOL><INDENT>return<EOL><DEDENT>first_branch_is_bool = self._is_bool_const(first_branch)<EOL>else_branch_is_bool = self._is_bool_const(else_branch)<EOL>reduced_to = "<STR_LIT>"<EOL><DEDENT>elif isinstance(first_branch, astroid.Assign):<EOL><INDENT>if not isinstance(else_branch, astroid.Assign):<EOL><INDENT>return<EOL><DEDENT>first_branch_targets = [<EOL>target.name<EOL>for target in first_branch.targets<EOL>if isinstance(target, astroid.AssignName)<EOL>]<EOL>else_branch_targets = [<EOL>target.name<EOL>for target in else_branch.targets<EOL>if isinstance(target, astroid.AssignName)<EOL>]<EOL>if not first_branch_targets or not else_branch_targets:<EOL><INDENT>return<EOL><DEDENT>if sorted(first_branch_targets) != sorted(else_branch_targets):<EOL><INDENT>return<EOL><DEDENT>first_branch_is_bool = self._is_bool_const(first_branch)<EOL>else_branch_is_bool = self._is_bool_const(else_branch)<EOL>reduced_to = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>return<EOL><DEDENT>if not first_branch_is_bool or not else_branch_is_bool:<EOL><INDENT>return<EOL><DEDENT>if not first_branch.value.value:<EOL><INDENT>return<EOL><DEDENT>self.add_message("<STR_LIT>", node=node, args=(reduced_to,))<EOL>
Check if the given if node can be simplified.

        The if statement can be reduced to a boolean expression
        in some cases. For instance, if there are two branches
        and both of them return a boolean value that depends on
        the result of the statement's test, then this can be reduced
        to `bool(test)` without losing any functionality.