<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_boolean(node):
 """Checks if node is True or False"""

    return any([
        isinstance(node, ast.Name)
        and node.id in ('True', 'False'),
        hasattr(ast, 'NameConstant')  # Support for Python 3 NameConstant
        and isinstance(node, getattr(ast, 'NameConstant'))  # screw you pylint!
        and str(node.value) in ('True', 'False')
    ])