class_docstr: Learning node for Hoeffding Adaptive Tree.
  
  Parameters
  ----------
  stats
      Initial class observations.
  depth
      The depth of the learning node in the tree.
  splitter
      The numeric attribute observer algorithm used to monitor target statistics
      and perform split attempts.
  drift_detector
      The detector used internally to monitor drifts.
  rng
      Random number generator used in Poisson sampling.
  kwargs
      Other parameters passed to the learning node.
code: def prediction(self, x, *, tree=None):
      if not self.stats:
          return
  
      prediction_option = tree.leaf_prediction
      if (
          not self.is_active()
          or prediction_option == tree._MAJORITY_CLASS
      ):
          dist = normalize_values_in_dict(self.stats, inplace=False)
      elif prediction_option == tree._NAIVE_BAYES:
          if self.total_weight >= tree.nb_threshold:
              dist = do_naive_bayes_prediction(
                  x, self.stats, self.splitters
              )
          else:  # Use majority class
              dist = normalize_values_in_dict(self.stats, inplace=False)
      else:  # Naive Bayes Adaptive
          dist = super().prediction(x, tree=tree)
  
      dist_sum = sum(dist.values())
      curr_error = self._mean_error.get()
      normalization_factor = dist_sum * curr_error * curr_error
  
      # Weight node's responses accordingly to the estimated error monitored by ADWIN
      # Useful if both the predictions of the alternate tree and the ones from the main tree
      # are combined -> give preference to the most accurate one
      dist = normalize_values_in_dict(
          dist, normalization_factor, inplace=False
      )
  
      return dist
  
imports: from __future__ import annotations
  import math
  from river import stats
  from river.utils.norm import normalize_values_in_dict
  from river.utils.random import poisson
  from ..utils import do_naive_bayes_prediction
  from .branch import DTBranch, NominalBinaryBranch, NominalMultiwayBranch, NumericBinaryBranch, NumericMultiwayBranch
  from .htc_nodes import LeafNaiveBayesAdaptive
  from .leaf import HTLeaf
label_desc: Use image node_id 4 for calling the AdaLeafClassifier obj's underlying member method code with example usage: obj.prediction(x) and returns: dist