def METHOD_NAME(self) -> Iterator["ResolvedNode[Node]"]:
    if isinstance(self.node, Module):
        modules = list(self.modules)
        modules.append(BoundNode(self.name, self.node))
        for attr, node in self.node.METHOD_NAME.items():
            yield ResolvedNode(modules, self.classes, attr, node)
    elif isinstance(self.node, Class):
        classes = list(self.classes)
        classes.append(BoundNode(self.name, self.node))
        for attr, node in self.node.METHOD_NAME.items():
            yield ResolvedNode(self.modules, classes, attr, node)