class_docstr: Node that splits the data in a Hoeffding Adaptive Tree Regression.
  
  Parameters
  ----------
  stats
      Target stats.
  depth
      The depth of the node.
  drift_detector
      The detector used to monitor concept drifts.
  attributes
      Other parameters passed to the split node.
class_docstr_tok: ["Node","that","splits","the","data","in","a","Hoeffding","Adaptive","Tree","Regression",".","Parameters","--","--","--","--","--","stats","Target","stats",".","depth","The","depth","of","the","node",".","drift_detector","The","detector","used","to","monitor","concept","drifts",".","attributes","Other","parameters","passed","to","the","split","node","."]
docstr: Return the leaves corresponding to the given input.
  
  Alternate subtree leaves are also included.
  
  Parameters
  ----------
  x
      The input instance.
  until_leaf
      Whether or not branch nodes can be returned in case of missing features or emerging
      feature categories.
docstr_tok: ["Return","the","leaves","corresponding","to","the","given","input",".","Alternate","subtree","leaves","are","also","included",".","Parameters","--","--","--","--","--","x","The","input","instance",".","until_leaf","Whether","or","not","branch","nodes","can","be","returned","in","case","of","missing","features","or","emerging","feature","categories","."]
code: def traverse(self, x, until_leaf=True) -> list[HTLeaf]:  # type: ignore
      """Return the leaves corresponding to the given input.
  
      Alternate subtree leaves are also included.
  
      Parameters
      ----------
      x
          The input instance.
      until_leaf
          Whether or not branch nodes can be returned in case of missing features or emerging
          feature categories.
      """
      found_nodes: list[HTLeaf] = []
      for node in self.walk(x, until_leaf=until_leaf):
          if (
              isinstance(node, AdaBranchRegressor)
              and node._alternate_tree
          ):
              if isinstance(node._alternate_tree, AdaBranchRegressor):
                  found_nodes.append(
                      node._alternate_tree.traverse(x, until_leaf=until_leaf)  # type: ignore
                  )
              else:
                  found_nodes.append(node._alternate_tree)  # type: ignore
  
      found_nodes.append(node)  # type: ignore
      return found_nodes
  
imports: from __future__ import annotations
  import math
  from river import stats
  from river.utils.random import poisson
  from .branch import DTBranch, NominalBinaryBranch, NominalMultiwayBranch, NumericBinaryBranch, NumericMultiwayBranch
  from .htr_nodes import LeafAdaptive, LeafMean, LeafModel
  from .leaf import HTLeaf
label_desc: Use image node_id 2 for calling the AdaBranchRegressor obj's underlying member method code with example usage: obj.traverse(x, until_leaf) and returns: found_nodes