class_docstr: Simple class to decide if the number of trials of a given status in the
  GenerationStrategy experiment has reached a certain threshold.
class_docstr_tok: ["Simple","class","to","decide","if","the","number","of","trials","of","a","given","status","in","the","GenerationStrategy","experiment","has","reached","a","certain","threshold","."]
docstr: If the enforce flag is set, raises an error because the remaining
  TransitionCriterion cannot be completed in the current state.
docstr_tok: ["If","the","enforce","flag","is","set",",","raises","an","error","because","the","remaining","TransitionCriterion","can","not","be","completed","in","the","current","state","."]
code: def block_continued_generation_error(
      self,
      node_name: Optional[str],
      model_name: Optional[str],
      experiment: Optional[Experiment],
      trials_from_node: Optional[Set[int]] = None,
  ) -> None:
      """If the enforce flag is set, raises an error because the remaining
      TransitionCriterion cannot be completed in the current state.
      """
      if self.block_gen_if_met:
          raise DataRequiredError(
              f"This criterion, {self.criterion_class} has been met but cannot "
              "continue generation from its associated GenerationNode."
          )
  
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 MinTrials obj's underlying member method code with example usage: obj.block_continued_generation_error(node_name, model_name, experiment, trials_from_node) without return types