class_docstr: Class for a runner that works with the BackendSimulator.
class_docstr_tok: ["Class","for","a","runner","that","works","with","the","BackendSimulator","."]
docstr: Stop a trial on the BackendSimulator.
  
  Args:
      trial: Trial to stop on the simulator.
      reason: A message containing information why the trial is to be stopped.
  
  Returns:
      A dictionary containing a single key "reason" that maps to the reason
      passed to the function. If no reason was given, returns an empty dictionary.
docstr_tok: ["Stop","a","trial","on","the","BackendSimulator",".","Args",":","trial",":","Trial","to","stop","on","the","simulator",".","reason",":","A","message","containing","information","why","the","trial","is","to","be","stopped",".","Returns",":","A","dictionary","containing","a","single","key","``","reason","''","that","maps","to","the","reason","passed","to","the","function",".","If","no","reason","was","given",",","returns","an","empty","dictionary","."]
code: def stop(
      self, trial: BaseTrial, reason: Optional[str] = None
  ) -> Dict[str, Any]:
      """Stop a trial on the BackendSimulator.
  
      Args:
          trial: Trial to stop on the simulator.
          reason: A message containing information why the trial is to be stopped.
  
      Returns:
          A dictionary containing a single key "reason" that maps to the reason
          passed to the function. If no reason was given, returns an empty dictionary.
      """
      self.simulator.stop_trial(trial.index)
      return {"reason": reason} if reason else {}
  
file_path: Ax/ax/runners/simulated_backend.py
imports: from collections import defaultdict
  from typing import Any, Callable, Dict, Iterable, Optional, Set
  import numpy
  from ax.core.base_trial import BaseTrial, TrialStatus
  from ax.core.runner import Runner
  from ax.utils.testing.backend_simulator import BackendSimulator
label_desc: Use image node_id 4 for calling the SimulatedBackendRunner obj's underlying member method code with example usage: obj.stop(trial, reason) and returns: unknown