Tutorials
Library walkthrough
visit_all_connected()
Reference documentation
Visit all nodes that are connected to a list of nodes.
nodes (Sequence[Node]) – The nodes to traverse.
func (Callable[[Node], Any]) – The function to apply to each node in the tree. Note that you can raise a StopTraverse exception to stop the traversal of the tree for any reason.