class_docstr: A generic tree branch.
  
  Parameters
  ----------
  children
      Child branches and/or leaves.
class_docstr_tok: ["A","generic","tree","branch",".","Parameters","--","--","--","--","--","children","Child","branches","and\/or","leaves","."]
docstr: Iterate over the nodes of the path induced by x.
docstr_tok: ["Iterate","over","the","nodes","of","the","path","induced","by","x","."]
code: def walk(self, x, until_leaf=True) -> typing.Iterable[Branch | Leaf]:
      """Iterate over the nodes of the path induced by x."""
      yield self
      try:
          yield from self.next(x).walk(x, until_leaf)
      except KeyError:
          if until_leaf:
              _, node = self.most_common_path()
              yield node
              yield from node.walk(x, until_leaf)
  
imports: from __future__ import annotations
  import abc
  import typing
  from collections import defaultdict
  from queue import Queue
  from xml.etree import ElementTree
  import pandas
  from river import base
label_desc: Use image node_id 5 for calling the Branch obj's underlying member method code with example usage: obj.walk(x, until_leaf) without return types