def infer_bool(node, context=None):
if len(node.args) > <NUM_LIT:1>:<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>if not node.args:<EOL><INDENT>return nodes.Const(False)<EOL><DEDENT>argument = node.args[<NUM_LIT:0>]<EOL>try:<EOL><INDENT>inferred = next(argument.infer(context=context))<EOL><DEDENT>except InferenceError:<EOL><INDENT>return util.Uninferable<EOL><DEDENT>if inferred is util.Uninferable:<EOL><INDENT>return util.Uninferable<EOL><DEDENT>bool_value = inferred.bool_value()<EOL>if bool_value is util.Uninferable:<EOL><INDENT>return util.Uninferable<EOL><DEDENT>return nodes.Const(bool_value)<EOL>
Understand bool calls.