def _iter_nodes(self, node, recursive=False, max_depth=float('<STR_LIT>'),<EOL>with_links=True, in_search=False, predicate=None):
def _run_predicate(x, run_name_set):<EOL><INDENT>branch = x.v_run_branch<EOL>return branch == '<STR_LIT>' or branch in run_name_set<EOL><DEDENT>if max_depth is None:<EOL><INDENT>max_depth = float('<STR_LIT>')<EOL><DEDENT>if predicate is None:<EOL><INDENT>predicate = lambda x: True<EOL><DEDENT>elif isinstance(predicate, (tuple, list)):<EOL><INDENT>run_list = predicate<EOL>run_name_set = set()<EOL>for item in run_list:<EOL><INDENT>if item == -<NUM_LIT:1>:<EOL><INDENT>run_name_set.add(self._root_instance.f_wildcard('<STR_LIT:$>', -<NUM_LIT:1>))<EOL><DEDENT>elif isinstance(item, int):<EOL><INDENT>run_name_set.add(self._root_instance.f_idx_to_run(item))<EOL><DEDENT>else:<EOL><INDENT>run_name_set.add(item)<EOL><DEDENT><DEDENT>predicate = lambda x: _run_predicate(x, run_name_set)<EOL><DEDENT>if recursive:<EOL><INDENT>return NaturalNamingInterface._recursive_traversal_bfs(node,<EOL>self._root_instance._linked_by,<EOL>max_depth, with_links,<EOL>in_search, predicate)<EOL><DEDENT>else:<EOL><INDENT>iterator = (x for x in self._make_child_iterator(node, with_links) if<EOL>predicate(x[<NUM_LIT:2>]))<EOL>if in_search:<EOL><INDENT>return iterator <EOL><DEDENT>else:<EOL><INDENT>return (x[<NUM_LIT:2>] for x in iterator)<EOL><DEDENT><DEDENT>
Returns an iterator over nodes hanging below a given start node.

        :param node:

            Start node

        :param recursive:

            Whether recursively also iterate over the children of the start node's children

        :param max_depth:

            Maximum depth to search for

        :param in_search:

            if it is used during get search and if detailed info should be returned

        :param with_links:

            If links should be considered

        :param predicate:

            A predicate to filter nodes

        :return: Iterator