docstr: Transfer information from a leaf to a new branch.
docstr_tok: ["Transfer","information","from","a","leaf","to","a","new","branch","."]
code: def replant(
      self, leaf: MondrianNodeRegressor, copy_all: bool = False
  ):
      """Transfer information from a leaf to a new branch."""
      self.weight = leaf.weight  # type: ignore
      self.log_weight_tree = leaf.log_weight_tree  # type: ignore
      self.mean = leaf.mean
  
      if copy_all:
          self.memory_range_min = leaf.memory_range_min
          self.memory_range_max = leaf.memory_range_max
          self.n_samples = leaf.n_samples
  
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 2 for calling the MondrianNodeRegressor obj's underlying member method code with example usage: obj.replant(leaf, copy_all) without return types