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: Returns the number of trials until the threshold is met.
  
  Args:
      experiment: The experiment associated with this GenerationStrategy.
docstr_tok: ["Returns","the","number","of","trials","until","the","threshold","is","met",".","Args",":","experiment",":","The","experiment","associated","with","this","GenerationStrategy","."]
code: def num_till_threshold(
      self, experiment: Experiment, trials_from_node: Optional[Set[int]]
  ) -> int:
      """Returns the number of trials until the threshold is met.
  
      Args:
          experiment: The experiment associated with this GenerationStrategy.
      """
      return self.threshold - self.num_contributing_to_threshold(
          experiment=experiment, trials_from_node=trials_from_node
      )
  
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 5 for calling the TrialBasedCriterion obj's underlying member method code with example usage: obj.num_till_threshold(experiment, trials_from_node) and returns: unknown