def METHOD_NAME(node: ast.AST, depth: int = 0) -> Iterator[str]:
    """Simple visitor generating strings to compare ASTs by content."""
    if (
        isinstance(node, ast.Constant)
        and isinstance(node.value, str)
        and node.kind == "u"
    ):
        # It's a quirk of history that we strip the u prefix over here. We used to
        # rewrite the AST nodes for Python version compatibility and we never copied
        # over the kind
        node.kind = None
    yield f"{'  ' * depth}{node.__class__.__name__}("
    for field in sorted(node._fields):  # noqa: F402
        # TypeIgnore has only one field 'lineno' which breaks this comparison
        if isinstance(node, ast.TypeIgnore):
            break
        try:
            value: object = getattr(node, field)
        except AttributeError:
            continue
        yield f"{'  ' * (depth+1)}{field}="
        if isinstance(value, list):
            for item in value:
                # Ignore nested tuples within del statements, because we may insert
                # parentheses and they change the AST.
                if (
                    field == "targets"
                    and isinstance(node, ast.Delete)
                    and isinstance(item, ast.Tuple)
                ):
                    for elt in item.elts:
                        yield from METHOD_NAME(elt, depth + 2)
                elif isinstance(item, ast.AST):
                    yield from METHOD_NAME(item, depth + 2)
        elif isinstance(value, ast.AST):
            yield from METHOD_NAME(value, depth + 2)
        else:
            normalized: object
            if (
                isinstance(node, ast.Constant)
                and field == "value"
                and isinstance(value, str)
            ):
                # Constant strings may be indented across newlines, if they are
                # docstrings; fold spaces after newlines when comparing. Similarly,
                # trailing and leading space may be removed.
                normalized = _normalize("\n", value)
            elif field == "type_comment" and isinstance(value, str):
                # Trailing whitespace in type comments is removed.
                normalized = value.rstrip()
            else:
                normalized = value
            yield f"{'  ' * (depth+2)}{normalized!r},  # {value.__class__.__name__}"
    yield f"{'  ' * depth})  # /{node.__class__.__name__}"