code: def fit_botorch_model(
      model: Model,
      mll_class: Type[MarginalLogLikelihood],
      mll_options: Optional[Dict[str, Any]] = None,
  ) -> None:
      """Fit a BoTorch model."""
      mll_options = mll_options or {}
      models = model.models if isinstance(model, ModelList) else [model]
      for m in models:
          # TODO: Support deterministic models when we support `ModelList`
          if is_fully_bayesian(m):
              fit_fully_bayesian_model_nuts(
                  m,
                  disable_progbar=True,
                  **mll_options,
              )
          elif isinstance(m, (GPyTorchModel, PairwiseGP)):
              mll_options = mll_options or {}
              mll = mll_class(
                  likelihood=m.likelihood, model=m, **mll_options
              )
              fit_gpytorch_mll(mll)
          else:
              raise NotImplementedError(
                  f"Model of type {m.__class__.__name__} is currently not supported."
              )
  
imports: import warnings
  from logging import Logger
  from typing import Any, Callable, Dict, List, Optional, OrderedDict, Tuple, Type
  import torch
  from ax.core.search_space import SearchSpaceDigest
  from ax.exceptions.core import AxError, AxWarning, UnsupportedError
  from ax.models.types import TConfig
  from ax.utils.common.constants import Keys
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast, not_none
  from botorch.acquisition.acquisition import AcquisitionFunction
  from botorch.acquisition.logei import qLogNoisyExpectedImprovement
  from botorch.acquisition.multi_objective.logei import qLogNoisyExpectedHypervolumeImprovement
  from botorch.fit import fit_fully_bayesian_model_nuts, fit_gpytorch_mll
  from botorch.models.fully_bayesian import SaasFullyBayesianSingleTaskGP
  from botorch.models.gp_regression import SingleTaskGP
  from botorch.models.gp_regression_fidelity import SingleTaskMultiFidelityGP
  from botorch.models.gp_regression_mixed import MixedSingleTaskGP
  from botorch.models.gpytorch import BatchedMultiOutputGPyTorchModel, GPyTorchModel
  from botorch.models.model import Model, ModelList
  from botorch.models.multitask import MultiTaskGP
  from botorch.models.pairwise_gp import PairwiseGP
  from botorch.utils.datasets import SupervisedDataset
  from botorch.utils.transforms import is_fully_bayesian
  from gpytorch.mlls.marginal_log_likelihood import MarginalLogLikelihood
  from torch import Tensor
label_desc: Use image node_id 7 for calling a global function with example usage: fit_botorch_model(model, mll_class, mll_options) without return types