def METHOD_NAME(self, statement: nodes.NodeNG) -> Generator[nodes.NodeNG, None, None]:
    multiple_nodes = lambda nodes_: chain.from_iterable(self.METHOD_NAME(node) for node in nodes_)
    if isinstance(statement, nodes.Assign):
        # RHS is evaluated before assigned in an assignment statement
        yield from self.METHOD_NAME(statement.value)
        yield from multiple_nodes(statement.targets)  # statement.targets is a list of nodes
    elif isinstance(
        statement, (nodes.ListComp, nodes.SetComp, nodes.DictComp, nodes.GeneratorExp)
    ):
        # Comprehension targets are assigned before expression is evaluated.
        yield from multiple_nodes(
            statement.generators
        )  # statement.generators is a list of nodes
        if not hasattr(statement, "elt"):
            yield from self.METHOD_NAME(statement.key)  # keys evaluated first
            yield from self.METHOD_NAME(statement.value)
        else:
            yield from self.METHOD_NAME(statement.elt)
    elif isinstance(statement, (nodes.AssignName, nodes.DelName, nodes.Name)):
        yield statement
    elif not isinstance(statement, nodes.FunctionDef):
        yield from multiple_nodes(statement.get_children())