docstr: Update the node when running a downward procedure updating the tree.
  
  Parameters
  ----------
  x
      Sample to proceed.
  y
      Class of the sample x.
  dirichlet
      Dirichlet parameter of the tree.
  use_aggregation
      Should it use the aggregation or not
  step
      Step of the tree.
  do_update_weight
      Should we update the weights of the node as well.
  n_classes
      The total number of classes of the problem.
docstr_tok: ["Update","the","node","when","running","a","downward","procedure","updating","the","tree",".","Parameters","--","--","--","--","--","x","Sample","to","proceed",".","y","Class","of","the","sample","x.","dirichlet","Dirichlet","parameter","of","the","tree",".","use_aggregation","Should","it","use","the","aggregation","or","not","step","Step","of","the","tree",".","do_update_weight","Should","we","update","the","weights","of","the","node","as","well",".","n_classes","The","total","number","of","classes","of","the","problem","."]
code: def update_downwards(
      self,
      x,
      y: base.typing.ClfTarget,
      dirichlet: float,
      use_aggregation: bool,
      step: float,
      do_update_weight: bool,
      n_classes: int,
  ):
      """Update the node when running a downward procedure updating the tree.
  
      Parameters
      ----------
      x
          Sample to proceed.
      y
          Class of the sample x.
      dirichlet
          Dirichlet parameter of the tree.
      use_aggregation
          Should it use the aggregation or not
      step
          Step of the tree.
      do_update_weight
          Should we update the weights of the node as well.
      n_classes
          The total number of classes of the problem.
  
      """
  
      # Updating the range of the feature values known by the node
      # If it is the first sample, we copy the features vector into the min and max range
      if self.n_samples == 0:
          for feature in x:
              x_f = x[feature]
              self.memory_range_min[feature] = x_f
              self.memory_range_max[feature] = x_f
      # Otherwise, we update the range
      else:
          for feature in x:
              x_f = x[feature]
              if x_f < self.memory_range_min[feature]:
                  self.memory_range_min[feature] = x_f
              if x_f > self.memory_range_max[feature]:
                  self.memory_range_max[feature] = x_f
  
      # One more sample in the node
      self.n_samples += 1
  
      if do_update_weight:
          self.update_weight(
              y, dirichlet, use_aggregation, step, n_classes
          )
  
      self.update_count(y)
  
imports: from __future__ import annotations
  import collections
  import math
  from river import base, stats
  from river.tree.base import Branch, Leaf
  from river.utils.math import log_sum_2_exp
label_desc: Use image node_id 9 for calling the MondrianNodeClassifier obj's underlying member method code with example usage: obj.update_downwards(x, y, dirichlet, use_aggregation, step, do_update_weight, n_classes) without return types