code: def get_surrogate_spec_as_dict(
      model_class: Optional[str] = None,
  ) -> Dict[str, Any]:
      """
      For use ensuring backwards compatibility when loading SurrogateSpec
      with input_transform and outcome_transform kwargs.
      """
      if model_class is None:
          model_class = "SingleTaskGP"
      return {
          "__type": "SurrogateSpec",
          "botorch_model_class": {
              "__type": "Type[Model]",
              "index": model_class,
              "class": "<class 'botorch.models.model.Model'>",
          },
          "botorch_model_kwargs": {},
          "mll_class": {
              "__type": "Type[MarginalLogLikelihood]",
              "index": "ExactMarginalLogLikelihood",
              "class": (
                  "<class 'gpytorch.mlls.marginal_log_likelihood"
                  ".MarginalLogLikelihood'>"
              ),
          },
          "mll_kwargs": {},
          "covar_module_class": None,
          "covar_module_kwargs": None,
          "likelihood_class": None,
          "likelihood_kwargs": None,
          "input_transform": None,
          "outcome_transform": None,
          "allow_batched_models": False,
          "outcomes": [],
      }
  
imports: from logging import Logger
  from typing import Any, Dict, List, Optional, Type
  import numpy
  from ax.core.base_trial import TrialStatus
  from ax.core.experiment import Experiment
  from ax.core.observation import Observation, ObservationData, ObservationFeatures
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.parameter import FixedParameter, RangeParameter
  from ax.core.search_space import SearchSpace
  from ax.modelbridge.base import ModelBridge
  from ax.modelbridge.dispatch_utils import choose_generation_strategy
  from ax.modelbridge.factory import get_sobol
  from ax.modelbridge.generation_node import GenerationNode
  from ax.modelbridge.generation_strategy import GenerationStep, GenerationStrategy
  from ax.modelbridge.model_spec import ModelSpec
  from ax.modelbridge.registry import Models
  from ax.modelbridge.transforms.base import Transform
  from ax.modelbridge.transforms.int_to_float import IntToFloat
  from ax.modelbridge.transition_criterion import MaxGenerationParallelism, MaxTrials, MinimumPreferenceOccurances, MinTrials
  from ax.models.torch.botorch_modular.surrogate import Surrogate
  from ax.utils.common.logger import get_logger
  from ax.utils.testing.core_stubs import get_experiment, get_search_space, get_search_space_for_value
  from botorch.acquisition.monte_carlo import qNoisyExpectedImprovement
  from botorch.models.fully_bayesian import SaasFullyBayesianSingleTaskGP
  from botorch.models.transforms.input import InputTransform, Normalize
  from botorch.models.transforms.outcome import OutcomeTransform, Standardize
label_desc: Use image node_id 18 for calling a global function with example usage: get_surrogate_spec_as_dict(model_class) and returns: dict