class_docstr: A Scheduler that uses a simulated backend for Ax asynchronous benchmarks.
class_docstr_tok: ["A","Scheduler","that","uses","a","simulated","backend","for","Ax","asynchronous","benchmarks","."]
docstr: Given a set of trial indices, decide whether or not to early-stop
  running trials using the ``early_stopping_strategy``.
  
  Args:
      trial_indices: Indices of trials to consider for early stopping.
  
  Returns:
      Dict with new suggested ``TrialStatus`` as keys and a set of
      indices of trials to update (subset of initially-passed trials) as values.
docstr_tok: ["Given","a","set","of","trial","indices",",","decide","whether","or","not","to","early-stop","running","trials","using","the","``","early_stopping_strategy","``",".","Args",":","trial_indices",":","Indices","of","trials","to","consider","for","early","stopping",".","Returns",":","Dict","with","new","suggested","``","TrialStatus","``","as","keys","and","a","set","of","indices","of","trials","to","update","(","subset","of","initially-passed","trials",")","as","values","."]
code: def should_stop_trials_early(
      self, trial_indices: Set[int]
  ) -> Dict[int, Optional[str]]:
      """Given a set of trial indices, decide whether or not to early-stop
      running trials using the ``early_stopping_strategy``.
  
      Args:
          trial_indices: Indices of trials to consider for early stopping.
  
      Returns:
          Dict with new suggested ``TrialStatus`` as keys and a set of
          indices of trials to update (subset of initially-passed trials) as values.
      """
      # TODO: The status on the experiment does not distinguish between
      # running and queued trials, so here we check status on the
      # ``backend_simulator`` directly to make sure it is running.
      running_trials = set()
      skipped_trials = set()
      for trial_index in trial_indices:
          sim_trial = self.backend_simulator.get_sim_trial_by_index(
              trial_index
          )
          if (
              sim_trial.sim_start_time is not None
              and (  # pyre-ignore[16]
                  self.backend_simulator.time - sim_trial.sim_start_time
                  > 0
              )
          ):
              running_trials.add(trial_index)
          else:
              skipped_trials.add(trial_index)
      if len(skipped_trials) > 0:
          logger.info(
              f"Not sending {skipped_trials} to base `should_stop_trials_early` "
              "because they have not been running for a positive amount of time "
              "on the backend simulator."
          )
      return super().should_stop_trials_early(
          trial_indices=running_trials
      )
  
file_path: Ax/ax/utils/testing/backend_scheduler.py
imports: from __future__ import annotations
  from dataclasses import replace
  from logging import Logger
  from typing import Dict, Optional, Set
  from ax.core.experiment import Experiment
  from ax.modelbridge.generation_strategy import GenerationStrategy
  from ax.runners.simulated_backend import SimulatedBackendRunner
  from ax.service.scheduler import Scheduler, SchedulerOptions
  from ax.utils.common.logger import get_logger
  from ax.utils.testing.backend_simulator import BackendSimulator
label_desc: Use image node_id 3 for calling the AsyncSimulatedBackendScheduler obj's underlying member method code with example usage: obj.should_stop_trials_early(trial_indices) and returns: super