<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_none(node):
    '''Check whether an AST node corresponds to None.

    In Python 2 None uses the same ast.Name class that variables etc. use,
    but in Python 3 there is a new ast.NameConstant class.
    '''
    if PY2:
        return isinstance(node, ast.Name) and node.id == 'None'
    return isinstance(node, ast.NameConstant) and node.value is None