import ast


def _is_name(node: ast.expr | None, name: str) -> bool:
    """Return True if `node` is an `ast.Name` node with id `name`

    >>> import ast
    >>> node = ast.Name(id="Any")
    >>> _is_name(node, "Any")
    True
    """
    return isinstance(node, ast.Name) and node.id == name