class_docstr: Representation of a node within a Mondrian tree
docstr: Update the weight of the node in the tree.
docstr_tok: ["Update","the","weight","of","the","node","in","the","tree","."]
code: def update_weight_tree(self):
      """Update the weight of the node in the tree."""
  
      if isinstance(self, MondrianLeaf):
          self.log_weight_tree = self.weight
      else:
          left, right = self.children
          self.log_weight_tree = log_sum_2_exp(
              self.weight, left.log_weight_tree + right.log_weight_tree
          )
  
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 3 for calling the MondrianNode obj's underlying member method code with example usage: obj.update_weight_tree() without return types