code: def learn_one(self, x, y):
      for i in self._rankings[: self._s]:
          model = self.models[i]
          metric = self._metrics[i]
          y_pred = self._pred_func(model)(x)
          metric.update(y_true=y, y_pred=y_pred)
          model.learn_one(x, y)
  
          # Check for a new best model
          if metric.is_better_than(self._metrics[self._best_model_idx]):
              self._best_model_idx = i
  
      self._n_iterations += 1
  
      if self._s > 1 and self._n_iterations == self._r:
          self._n_rungs += 1
          self._budget_used += self._s * self._r
  
          # Update the rankings of the current models based on their respective metric values
          self._rankings[: self._s] = sorted(
              self._rankings[: self._s],
              key=lambda i: self._metrics[i].get(),
              reverse=self.metric.bigger_is_better,
          )
  
          # Determine how many models to keep for the current rung
          cutoff = math.ceil(self._s / self.eta)
  
          if self.verbose:
              print(
                  "\t".join(
                      (
                          f"[{self._n_rungs}]",
                          f"{self._s - cutoff} removed",
                          f"{cutoff} left",
                          f"{self._r} iterations",
                          f"budget used: {self._budget_used}",
                          f"budget left: {self.budget - self._budget_used}",
                          f"best {self._metrics[self._rankings[0]]}",
                      )
                  ),
                  **self.print_kwargs,
              )
  
          # Determine where the next rung is located
          self._s = cutoff
          self._r = math.floor(
              self.budget
              / (self._s * math.ceil(math.log(self._n, self.eta)))
          )
  
imports: from __future__ import annotations
  import abc
  import math
  from river import metrics
  from river.model_selection.base import ModelSelectionClassifier, ModelSelectionRegressor
label_desc: Use image node_id 4 for calling the SuccessiveHalving obj's underlying member method code with example usage: obj.learn_one(x, y) without return types