class_docstr: Extends HyperBand early stopping algorithm for BOHB.
  
  This implementation removes the ``HyperBandScheduler`` pipelining. This
  class introduces key changes:
  
  1. Trials are now placed so that the bracket with the largest size is
  filled first.
  
  2. Trials will be paused even if the bracket is not filled. This allows
  BOHB to insert new trials into the training.
  
  See ray.tune.schedulers.HyperBandScheduler for parameter docstring.
docstr: If bracket is finished, all trials will be stopped.
  
  If a given trial finishes and bracket iteration is not done,
  the trial will be paused and resources will be given up.
  
  This scheduler will not start trials but will stop trials.
  The current running trial will not be handled,
  as the trialrunner will be given control to handle it.
code: def on_trial_result(
      self,
      tune_controller: "TuneController",
      trial: Trial,
      result: Dict,
  ) -> str:
      """If bracket is finished, all trials will be stopped.
  
      If a given trial finishes and bracket iteration is not done,
      the trial will be paused and resources will be given up.
  
      This scheduler will not start trials but will stop trials.
      The current running trial will not be handled,
      as the trialrunner will be given control to handle it."""
  
      result["hyperband_info"] = {}
      bracket, _ = self._trial_info[trial]
      bracket.update_trial_stats(trial, result)
  
      if bracket.continue_trial(trial):
          return TrialScheduler.CONTINUE
  
      result["hyperband_info"]["budget"] = bracket._cumul_r
  
      # MAIN CHANGE HERE!
      statuses = [(t, t.status) for t in bracket._live_trials]
      if not bracket.filled() or any(
          status != Trial.PAUSED
          for t, status in statuses
          if t is not trial
      ):
          # BOHB Specific. This hack existed in old Ray versions
          # and was removed, but it needs to be brought back
          # as otherwise the BOHB doesn't behave as intended.
          # The default concurrency limiter works by discarding
          # new suggestions if there are more running trials
          # than the limit. That doesn't take into account paused
          # trials. With BOHB, this leads to N trials finishing
          # completely and then another N trials starting,
          # instead of trials being paused and resumed in brackets
          # as intended.
          # There should be a better API for this.
          # TODO(team-ml): Refactor alongside HyperBandForBOHB
          tune_controller.search_alg.searcher.on_pause(trial.trial_id)
          return TrialScheduler.PAUSE
  
      logger.debug(f"Processing bracket after trial {trial} result")
      action = self._process_bracket(tune_controller, bracket)
      if action == TrialScheduler.PAUSE:
          tune_controller.search_alg.searcher.on_pause(trial.trial_id)
      return action
  
file_path: ray/python/ray/tune/schedulers/hb_bohb.py
imports: import logging
  from typing import Dict, Optional, TYPE_CHECKING
  from ray.tune.schedulers.trial_scheduler import TrialScheduler
  from ray.tune.schedulers.hyperband import HyperBandScheduler
  from ray.tune.experiment import Trial
  from ray.util import PublicAPI
label_desc: Use image node_id 2 for calling the HyperBandForBOHB obj's underlying member method code with example usage: obj.on_trial_result(tune_controller, trial, result) and returns: action, TrialScheduler, TrialScheduler