class_docstr: Simulator for a backend deployment with concurrent dispatch and a queue.
class_docstr_tok: ["Simulator","for","a","backend","deployment","with","concurrent","dispatch","and","a","queue","."]
docstr: Register a trial into the simulator.
  
  Args:
      trial: A new trial to add.
      status: The status of the new trial, either STAGED (add to ``self._queued``)
          or RUNNING (add to ``self._running``).
docstr_tok: ["Register","a","trial","into","the","simulator",".","Args",":","trial",":","A","new","trial","to","add",".","status",":","The","status","of","the","new","trial",",","either","STAGED","(","add","to","``","self._queued","``",")","or","RUNNING","(","add","to","``","self._running","``",")","."]
code: def new_trial(self, trial: SimTrial, status: TrialStatus) -> None:
      """Register a trial into the simulator.
  
      Args:
          trial: A new trial to add.
          status: The status of the new trial, either STAGED (add to ``self._queued``)
              or RUNNING (add to ``self._running``).
      """
      if status == TrialStatus.STAGED:
          self._queued.append(trial)
      elif status == TrialStatus.RUNNING:
          self._running.append(trial)
      else:
          raise ValueError(
              "New trials must be either staged or running."
          )
      self._index_to_trial_map[trial.trial_index] = trial
  
imports: import logging
  import random
  import time
  from dataclasses import dataclass
  from logging import Logger
  from typing import Dict, List, Optional
  from ax.core.base_trial import TrialStatus
  from ax.utils.common.logger import get_logger
label_desc: Use image node_id 14 for calling the BackendSimulator obj's underlying member method code with example usage: obj.new_trial(trial, status) without return types