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: Return a ``BackendSimulatorState`` containing the state of the simulator.
docstr_tok: ["Return","a","``","BackendSimulatorState","``","containing","the","state","of","the","simulator","."]
code: def state(self) -> BackendSimulatorState:
      """Return a ``BackendSimulatorState`` containing the state of the simulator."""
  
      options = BackendSimulatorOptions(
          max_concurrency=self.max_concurrency,
          time_scaling=self.time_scaling,
          failure_rate=self.failure_rate,
          internal_clock=self._internal_clock,
          use_update_as_start_time=self.use_update_as_start_time,
      )
      return BackendSimulatorState(
          options=options,
          verbose_logging=self._verbose_logging,
          queued=[q.__dict__.copy() for q in self._queued],
          running=[r.__dict__.copy() for r in self._running],
          failed=[r.__dict__.copy() for r in self._failed],
          completed=[c.__dict__.copy() for c in self._completed],
      )
  
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 11 for calling the BackendSimulator obj's underlying member method code with example usage: obj.state() and returns: BackendSimulatorState