code: def _load_generation_strategy_by_experiment_name(
      experiment_name: str,
      decoder: Decoder,
      experiment: Optional[Experiment] = None,
      reduced_state: bool = False,
      skip_runners_and_metrics: bool = False,
  ) -> GenerationStrategy:
      """Load a generation strategy attached to an experiment specified by a name,
      using given Decoder instance.
  
      1) Get SQLAlchemy object from DB.
      2) Convert to corresponding Ax object.
      """
      gs_id = get_generation_strategy_id(
          experiment_name=experiment_name, decoder=decoder
      )
      if gs_id is None:
          raise ObjectNotFoundError(
              f"Experiment {experiment_name} does not have a generation strategy "
              "attached to it."
          )
      if not experiment:
          experiment = _load_experiment(
              experiment_name=experiment_name,
              decoder=decoder,
              reduced_state=reduced_state,
              skip_runners_and_metrics=skip_runners_and_metrics,
          )
      return _load_generation_strategy_by_id(
          gs_id=gs_id,
          decoder=decoder,
          experiment=experiment,
          reduced_state=reduced_state,
      )
  
imports: from math import ceil
  from typing import Any, cast, Dict, List, Optional, Type
  from ax.core.experiment import Experiment
  from ax.core.generator_run import GeneratorRun
  from ax.core.metric import Metric
  from ax.core.trial import Trial
  from ax.exceptions.core import ExperimentNotFoundError, ObjectNotFoundError
  from ax.modelbridge.generation_strategy import GenerationStrategy
  from ax.storage.sqa_store.db import session_scope
  from ax.storage.sqa_store.decoder import Decoder
  from ax.storage.sqa_store.reduced_state import get_query_options_to_defer_immutable_duplicates, get_query_options_to_defer_large_model_cols
  from ax.storage.sqa_store.sqa_classes import SQAExperiment, SQAGenerationStrategy, SQAGeneratorRun, SQATrial
  from ax.storage.sqa_store.sqa_config import SQAConfig
  from ax.utils.common.constants import Keys
  from ax.utils.common.typeutils import checked_cast, not_none
  from sqlalchemy.orm import defaultload, lazyload, noload
  from sqlalchemy.orm.exc import DetachedInstanceError
label_desc: Use image node_id 11 for calling a global function with example usage: _load_generation_strategy_by_experiment_name(experiment_name, decoder, experiment, reduced_state, skip_runners_and_metrics) and returns: _load_generation_strategy_by_id