class_docstr: Adaptive Random Forest Hoeffding Tree Classifier.
  
  This is the base-estimator of the Adaptive Random Forest classifier.
  This variant of the Hoeffding Tree classifier includes the `max_features`
  parameter, which defines the number of randomly selected features to be
  considered at each split.
class_docstr_tok: ["Adaptive","Random","Forest","Hoeffding","Tree","Classifier",".","This","is","the","base-estimator","of","the","Adaptive","Random","Forest","classifier",".","This","variant","of","the","Hoeffding","Tree","classifier","includes","the","`","max_features","`","parameter",",","which","defines","the","number","of","randomly","selected","features","to","be","considered","at","each","split","."]
code: def _new_leaf(self, initial_stats=None, parent=None):
      if initial_stats is None:
          initial_stats = {}
  
      if parent is None:
          depth = 0
      else:
          depth = parent.depth + 1
  
      if self._leaf_prediction == self._MAJORITY_CLASS:
          return RandomLeafMajorityClass(
              initial_stats,
              depth,
              self.splitter,
              self.max_features,
              self.rng,
          )
      elif self._leaf_prediction == self._NAIVE_BAYES:
          return RandomLeafNaiveBayes(
              initial_stats,
              depth,
              self.splitter,
              self.max_features,
              self.rng,
          )
      else:  # NAIVE BAYES ADAPTIVE (default)
          return RandomLeafNaiveBayesAdaptive(
              initial_stats,
              depth,
              self.splitter,
              self.max_features,
              self.rng,
          )
  
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 BaseTreeClassifier obj's underlying member method code with example usage: obj._new_leaf(initial_stats, parent) and returns: RandomLeafMajorityClass, RandomLeafNaiveBayes, RandomLeafNaiveBayesAdaptive