class_docstr: ARF Hoeffding Tree regressor.
  
  This is the base-estimator of the Adaptive Random Forest regressor.
  This variant of the Hoeffding Tree regressor includes the `max_features`
  parameter, which defines the number of randomly selected features to be
  considered at each split.
class_docstr_tok: ["ARF","Hoeffding","Tree","regressor",".","This","is","the","base-estimator","of","the","Adaptive","Random","Forest","regressor",".","This","variant","of","the","Hoeffding","Tree","regressor","includes","the","`","max_features","`","parameter",",","which","defines","the","number","of","randomly","selected","features","to","be","considered","at","each","split","."]
docstr: Create a new learning node.
  
  The type of learning node depends on the tree configuration.
code: def _new_leaf(self, initial_stats=None, parent=None):  # noqa
      """Create a new learning node.
  
      The type of learning node depends on the tree configuration.
      """
  
      if parent is not None:
          depth = parent.depth + 1
      else:
          depth = 0
  
      leaf_model = None
      if self.leaf_prediction in {self._MODEL, self._ADAPTIVE}:
          if parent is None:
              leaf_model = copy.deepcopy(self.leaf_model)
          else:
              try:
                  leaf_model = copy.deepcopy(parent._leaf_model)  # noqa
              except AttributeError:
                  leaf_model = copy.deepcopy(self.leaf_model)
  
      if self.leaf_prediction == self._TARGET_MEAN:
          return RandomLeafMean(
              initial_stats,
              depth,
              self.splitter,
              self.max_features,
              self.rng,
          )
      elif self.leaf_prediction == self._MODEL:
          return RandomLeafModel(
              initial_stats,
              depth,
              self.splitter,
              self.max_features,
              self.rng,
              leaf_model=leaf_model,
          )
      else:  # adaptive learning node
          new_adaptive = RandomLeafAdaptive(
              initial_stats,
              depth,
              self.splitter,
              self.max_features,
              self.rng,
              leaf_model=leaf_model,
          )
          if parent is not None and isinstance(
              parent, RandomLeafAdaptive
          ):
              new_adaptive._fmse_mean = parent._fmse_mean  # noqa
              new_adaptive._fmse_model = parent._fmse_model  # noqa
  
          return new_adaptive
  
imports: from __future__ import annotations
  import abc
  import collections
  import copy
  import math
  import random
  import typing
  import numpy
  from river import base, metrics, stats
  from river.drift import ADWIN, NoDrift
  from river.tree.hoeffding_tree_classifier import HoeffdingTreeClassifier
  from river.tree.hoeffding_tree_regressor import HoeffdingTreeRegressor
  from river.tree.nodes.arf_htc_nodes import RandomLeafMajorityClass, RandomLeafNaiveBayes, RandomLeafNaiveBayesAdaptive
  from river.tree.nodes.arf_htr_nodes import RandomLeafAdaptive, RandomLeafMean, RandomLeafModel
  from river.tree.splitter import Splitter
  from river.utils.random import poisson
label_desc: Use image node_id 2 for calling the BaseTreeRegressor obj's underlying member method code with example usage: obj._new_leaf(initial_stats, parent) and returns: RandomLeafMean, RandomLeafModel, new_adaptive