code: def get_map_model(
      train_X: Tensor,
      train_Y: Tensor,
      train_Yvar: Tensor,
      decomposition: Dict[str, List[int]],
      train_embedding: bool = True,
      # pyre-fixme[24]: Generic type `dict` expects 2 type parameters, use
      #  `typing.Dict` to avoid runtime subscripting errors.
      cat_feature_dict: Optional[Dict] = None,
      # pyre-fixme[24]: Generic type `dict` expects 2 type parameters, use
      #  `typing.Dict` to avoid runtime subscripting errors.
      embs_feature_dict: Optional[Dict] = None,
      embs_dim_list: Optional[List[int]] = None,
      # pyre-fixme[24]: Generic type `dict` expects 2 type parameters, use
      #  `typing.Dict` to avoid runtime subscripting errors.
      context_weight_dict: Optional[Dict] = None,
  ) -> Tuple[LCEAGP, ExactMarginalLogLikelihood]:
      """Obtain MAP fitting of Latent Context Embedding Additive (LCE-A) GP."""
      # assert train_X is non-batched
      assert train_X.dim() < 3, "Don't support batch training"
      model = LCEAGP(
          train_X=train_X,
          train_Y=train_Y,
          train_Yvar=train_Yvar,
          decomposition=decomposition,
          train_embedding=train_embedding,
          embs_dim_list=embs_dim_list,
          cat_feature_dict=cat_feature_dict,
          embs_feature_dict=embs_feature_dict,
          context_weight_dict=context_weight_dict,
      )
      mll = ExactMarginalLogLikelihood(model.likelihood, model)
      fit_gpytorch_mll(mll)
      return model, mll
  
imports: from logging import Logger
  from typing import Any, cast, Dict, List, Optional, Tuple, Union
  from ax.core.search_space import SearchSpaceDigest
  from ax.core.types import TCandidateMetadata
  from ax.models.torch.alebo import ei_or_nei
  from ax.models.torch.botorch import BotorchModel
  from ax.models.torch.cbo_sac import generate_model_space_decomposition
  from ax.models.torch_base import TorchModel, TorchOptConfig
  from ax.utils.common.docutils import copy_doc
  from ax.utils.common.logger import get_logger
  from botorch.fit import fit_gpytorch_mll
  from botorch.models.contextual import LCEAGP
  from botorch.models.gpytorch import GPyTorchModel
  from botorch.models.model_list_gp_regression import ModelListGP
  from botorch.utils.datasets import SupervisedDataset
  from gpytorch.mlls.exact_marginal_log_likelihood import ExactMarginalLogLikelihood
  from torch import Tensor
label_desc: Use image node_id 1 for calling a global function with example usage: get_map_model(train_X, train_Y, train_Yvar, decomposition, train_embedding, cat_feature_dict, embs_feature_dict, embs_dim_list, context_weight_dict) and returns: model,  mll