code: def learn_one(self, x, y):
      if not self.models:
          self._init_trees(len(x))
  
      self._total_instances += 1
      trained = []
      for i, model in enumerate(self.models):
          y_hat = model.predict_one(x)
          in_drift, in_warning = self._detect(
              self._drift_detectors.get(i),
              self._warn_detectors.get(i),
              self._drift_input(y, y_hat),
          )
  
          if in_warning:
              self._background_trees[i] = self._new_member(
                  max_features=self._calculate_max_features(len(x)),
                  max_depth=self._calculate_tree_depth(),
                  seed=self._rng.randint(
                      0, sys.maxsize
                  ),  # randomly creates a new seed
              )
              # Reset the warning detector
              self._warn_detectors[i] = self.warning_detector.clone()
              # Update statistics
              self._n_warnings.update([i])
  
          # Drift detected: time to change (swap or reset) the affected tree
          if in_drift:
              if i in self._background_trees:
                  self.data[i] = self._background_trees[i]
                  del self._background_trees[i]
  
                  self._n_tree_swaps.update([i])
              else:
                  self.data[i] = self._new_member(
                      max_features=self._calculate_max_features(len(x)),
                      max_depth=self._calculate_tree_depth(),
                      seed=self._rng.randint(
                          0, sys.maxsize
                      ),  # randomly creates a new seed
                  )
              # Reset the drift detector
              self._drift_detectors[i] = self.drift_detector.clone()
              # Update statistics
              self._n_drifts.update([i])
              # Also reset tree's error estimates
              self._perf_sum -= self._perfs[i].get()
              self._perfs[i] = self.track_metric.clone()
              self._perf_sum += self._perfs[i].get()
              # And the number of observations of the new model
              self._sample_counter[i] = 0
  
          # Remove the old performance estimate
          self._perf_sum -= self._perfs[i].get()
          # Update metric
          self._perfs[i].update(y, y_hat)
          # Add the new performance estimate
          self._perf_sum += self._perfs[i].get()
  
          # Define the weight of the instance
          w = self._weight_sampler(self.resampling_rate, self._rng)
          if w == 0:  # Skip model update if w is zero
              continue
  
          model.learn_one(x, y, w=w)
  
          if i in self._background_trees:
              self._background_trees[i].learn_one(x, y, w=w)
  
          trained.append(i)
  
      # Increase by one the count of instances observed by each trained model
      self._sample_counter.update(trained)
  
imports: from __future__ import annotations
  import abc
  import collections
  import math
  import random
  import sys
  from river import base, drift, metrics, tree, utils
  from river.tree.nodes.et_nodes import ETLeafAdaptive, ETLeafMean, ETLeafModel
  from river.tree.splitter.random_splitter import RegRandomSplitter
label_desc: Use image node_id 12 for calling the ExtraTrees obj's underlying member method code with example usage: obj.learn_one(x, y) without return types