code: def update(self, att_val, target_val, w) -> Splitter:
      if self.threshold is None:
          if len(self._buffer) < self.buffer_size:
              self._buffer.append((att_val, target_val, w))
              return self
  
          mn = min(self._buffer, key=lambda t: t[0])[0]
          mx = max(self._buffer, key=lambda t: t[0])[0]
  
          self.threshold = self._rng.uniform(mn, mx)
  
          for a, t, w in self._buffer:
              self._update_stats(0 if a <= self.threshold else 1, t, w)
          self._buffer = None
  
          return self
  
      self._update_stats(
          0 if att_val <= self.threshold else 1, target_val, w
      )
  
      return self
  
file_path: river/river/tree/splitter/random_splitter.py
imports: from __future__ import annotations
  import abc
  import random
  import sys
  from river import stats
  from river.tree.splitter import Splitter
  from river.tree.utils import BranchFactory
label_desc: Use image node_id 5 for calling the RandomSplitter obj's underlying member method code with example usage: obj.update(att_val, target_val, w) and returns: self, self, self