def _identity_matcher(target):
    """Match a node to the target object by identity (PRIVATE)."""
    # This comment stops black style adding a blank line here, which causes flake8 D202.
    def match(node):
        return node is target

    return match