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 learn_one(
      self, x, y, *, w=1.0, tree=None, parent=None, parent_branch=None
  ):
      if tree.bootstrap_sampling:
          # Perform bootstrap-sampling
          k = poisson(rate=1, rng=self.rng)
          if k > 0:
              w *= k
  
      aux = self.prediction(x, tree=tree)
      y_pred = max(aux, key=aux.get) if aux else None
  
      detec_in = 0 if y == y_pred else 1
      old_error = self._mean_error.get()
  
      # Update the drift detector
      self.drift_detector.update(detec_in)
      self._mean_error.update(detec_in)
      error_change = self.drift_detector.drift_detected
  
      # Error is decreasing
      if error_change and old_error > self._mean_error.get():
          # Reset the error estimator
          self._mean_error = self._mean_error.clone()
  
      # Update statistics
      super().learn_one(x, y, w=w, tree=tree)
  
      weight_seen = self.total_weight
  
      if weight_seen - self.last_split_attempt_at >= tree.grace_period:
          if self.depth >= tree.max_depth:
              # Depth-based pre-pruning
              self.deactivate()
              tree._n_inactive_leaves += 1
              tree._n_active_leaves -= 1
          elif self.is_active():
              tree._attempt_to_split(
                  self,
                  parent,
                  parent_branch,
                  drift_detector=tree.drift_detector.clone(),
              )
              self.last_split_attempt_at = weight_seen
  
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 3 for calling the AdaLeafClassifier obj's underlying member method code with example usage: obj.learn_one(x, y) without return types