class_docstr: Logical object for tracking Hyperband bracket progress. Keeps track
  of proper parameters as designated by HyperBand.
  
  Also keeps track of progress to ensure good scheduling.
class_docstr_tok: ["Logical","object","for","tracking","Hyperband","bracket","progress",".","Keeps","track","of","proper","parameters","as","designated","by","HyperBand",".","Also","keeps","track","of","progress","to","ensure","good","scheduling","."]
code: def successive_halving(
      self, metric: str, metric_op: float
  ) -> Tuple[List[Trial], List[Trial]]:
      if self._halves == 0 and not self.stop_last_trials:
          return self._live_trials, []
      assert self._halves > 0
  
      # "Halving" is a misnomer. We're actually reducing by factor `eta`.
      self._halves -= 1
  
      # If we had 8 trials in the bracket and eta=2, we will keep 4.
      # If we had 9 trials in the bracket and eta=3, we will keep 3.
      self._n = int(np.ceil(self._n / self._eta))
  
      # Likewise, we increase the number of iterations until we process the bracket
      # again.
      # Remember r0 = max_t * self._eta ** (-s)
      # Let max_t=16, eta=2, s=1. Then r0=8, and we calculate r1=16.
      # Let max_t=16, eta=2, s=2. Then r0=4, and we calculate r1=8, r2=16.
  
      # Let max_t=81, eta=3, s=1. Then r0=27, and we calculate r1=81.
      # Let max_t=81, eta=3, s=2. Then r0=9, and we calculate r1=27, r2=81.
      self._r *= self._eta
      self._r = int(min(self._r, self._max_t_attr))
      self._cumul_r = self._r
      sorted_trials = sorted(
          self._live_trials,
          key=lambda t: metric_op * self._live_trials[t][metric],
      )
  
      good, bad = sorted_trials[-self._n :], sorted_trials[: -self._n]
      return good, bad
  
imports: import collections
  from typing import Dict, List, Optional, Tuple, TYPE_CHECKING
  import numpy
  import logging
  from ray.util.annotations import PublicAPI
  from ray.tune.result import DEFAULT_METRIC
  from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler
  from ray.tune.experiment import Trial
  from ray.tune.error import TuneError
label_desc: Use image node_id 8 for calling the _Bracket obj's underlying member method code with example usage: obj.successive_halving(metric, metric_op) and returns: good,  bad, self,  list