iter_node

Contents

iter_node#

class brainstate.graph.iter_node(node, allowed_hierarchy=(0, 2147483647))#

Iterate over all graph nodes within the given node.

Repeated nodes are visited only once. Yields (path, node) pairs.

Return type:

Iterator[tuple[Tuple[Key, ...], Any]]