code: def __init__(
      self,
      models,
      metric: metrics.base.Metric,
      budget: int,
      eta=2,
      verbose=False,
      **print_kwargs,
  ):
      super().__init__(models=models, metric=metric)  # type: ignore
      self.budget = budget
      self.eta = eta
      self.verbose = verbose
      self.print_kwargs = print_kwargs
  
      self._n = len(models)
      self._metrics = [metric.clone() for _ in range(self._n)]
      self._s = self._n
      self._n_rungs = 0
      self._rankings = list(range(self._n))
      self._r = math.floor(
          budget / (self._s * math.ceil(math.log(self._n, eta)))
      )
      self._budget_used = 0
      self._n_iterations = 0
      self._best_model_idx = 0
  
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 1 to create a new SuccessiveHalving object from inherited base classes: abc with example: obj = SuccessiveHalving(models, metric, budget, eta, verbose)