code: def _process_bracket(self, trial_runner, bracket, trial):
          
  
          action = TrialScheduler.PAUSE
          if bracket.cur_iter_done():
              if bracket.finished():
                  bracket.cleanup_full(trial_runner)
                  return TrialScheduler.STOP
  
              good, bad = bracket.successive_halving(self._reward_attr)
              # kill bad trials
              self._num_stopped += len(bad)
              for t in bad:
                  if t.status == Trial.PAUSED:
                      trial_runner.stop_trial(t)
                  elif t.status == Trial.RUNNING:
                      bracket.cleanup_trial(t)
                      action = TrialScheduler.STOP
                  else:
                      raise Exception("Trial with unexpected status encountered")
  
              # ready the good trials - if trial is too far ahead, don't continue
              for t in good:
                  if t.status not in [Trial.PAUSED, Trial.RUNNING]:
                      raise Exception("Trial with unexpected status encountered")
                  if bracket.continue_trial(t):
                      if t.status == Trial.PAUSED:
                          trial_runner.trial_executor.unpause_trial(t)
                      elif t.status == Trial.RUNNING:
                          action = TrialScheduler.CONTINUE
          return action
docs: This is called whenever a trial makes progress.
  
          When all live trials in the bracket have no more iterations left,
          Trials will be successively halved. If bracket is done, all
          non-running trials will be stopped and cleaned up,
          and during each halving phase, bad trials will be stopped while good
          trials will return to "PENDING".