docstr: If the block_continued_generation flag is set, raises the
  MaxParallelismReachedException error.
docstr_tok: ["If","the","block_continued_generation","flag","is","set",",","raises","the","MaxParallelismReachedException","error","."]
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 block_continued_generation flag is set, raises the
      MaxParallelismReachedException error.
      """
      assert (
          node_name is not None
          and model_name is not None
          and experiment is not None
      )
  
      if self.block_gen_if_met:
          raise MaxParallelismReachedException(
              node_name=node_name,
              model_name=model_name,
              num_running=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 2 for calling the MaxGenerationParallelism 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