class_docstr: Common class for action criterion that are based on trial information.
class_docstr_tok: ["Common","class","for","action","criterion","that","are","based","on","trial","information","."]
docstr: Get the trial indices from the entire experiment with the desired
  statuses.
  
  Args:
      experiment: The experiment associated with this GenerationStrategy.
      statuses: The statuses to filter on.
  Returns:
      The trial indices in the experiment with the desired statuses.
docstr_tok: ["Get","the","trial","indices","from","the","entire","experiment","with","the","desired","statuses",".","Args",":","experiment",":","The","experiment","associated","with","this","GenerationStrategy",".","statuses",":","The","statuses","to","filter","on",".","Returns",":","The","trial","indices","in","the","experiment","with","the","desired","statuses","."]
code: def experiment_trials_by_status(
      self, experiment: Experiment, statuses: List[TrialStatus]
  ) -> Set[int]:
      """Get the trial indices from the entire experiment with the desired
      statuses.
  
      Args:
          experiment: The experiment associated with this GenerationStrategy.
          statuses: The statuses to filter on.
      Returns:
          The trial indices in the experiment with the desired statuses.
      """
      exp_trials_with_statuses = set()
      for status in statuses:
          exp_trials_with_statuses = exp_trials_with_statuses.union(
              experiment.trial_indices_by_status[status]
          )
      return exp_trials_with_statuses
  
imports: from abc import abstractmethod
  from logging import Logger
  from typing import List, Optional, Set
  from ax.core.base_trial import TrialStatus
  from ax.core.experiment import Experiment
  from ax.exceptions.generation_strategy import MaxParallelismReachedException
  from ax.modelbridge.generation_strategy import DataRequiredError
  from ax.utils.common.base import SortableBase
  from ax.utils.common.logger import get_logger
  from ax.utils.common.serialization import SerializationMixin, serialize_init_args
label_desc: Use image node_id 2 for calling the TrialBasedCriterion obj's underlying member method code with example usage: obj.experiment_trials_by_status(experiment, statuses) and returns: exp_trials_with_statuses