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: Lookup the trial status of a ``trial_index``.
  
  Args:
      trial_index: The index of the trial to check.
  
  Returns:
      A ``TrialStatus``.
docstr_tok: ["Lookup","the","trial","status","of","a","``","trial_index","``",".","Args",":","trial_index",":","The","index","of","the","trial","to","check",".","Returns",":","A","``","TrialStatus","``","."]
code: def lookup_trial_index_status(
      self, trial_index: int
  ) -> Optional[TrialStatus]:
      """Lookup the trial status of a ``trial_index``.
  
      Args:
          trial_index: The index of the trial to check.
  
      Returns:
          A ``TrialStatus``.
      """
      sim_status = self.status()
      if trial_index in sim_status.queued:
          return TrialStatus.STAGED
      elif trial_index in sim_status.running:
          return TrialStatus.RUNNING
      elif trial_index in sim_status.completed:
          return TrialStatus.COMPLETED
      elif trial_index in sim_status.failed:
          return TrialStatus.FAILED
      return None
  
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 17 for calling the BackendSimulator obj's underlying member method code with example usage: obj.lookup_trial_index_status(trial_index) and returns: None, TrialStatus, TrialStatus, TrialStatus, TrialStatus