code: def call_for_nodes(node, callback, recursive=False):
      
      result = callback(node)
      if recursive and not result:
          for child in get_child_nodes(node):
              call_for_nodes(child, callback, recursive)
docs: If callback returns `True` the child nodes are skipped