code: def load_mcmc_samples_to_model(
      model: GPyTorchModel, mcmc_samples: Dict
  ) -> None:
      """Load MCMC samples into GPyTorchModel."""
      if "noise" in mcmc_samples:
          model.likelihood.noise_covar.noise = (
              mcmc_samples["noise"]
              .detach()
              .clone()
              .view(model.likelihood.noise_covar.noise.shape)
              .clamp_min(MIN_INFERRED_NOISE_LEVEL)
          )
      model.covar_module.base_kernel.lengthscale = (
          mcmc_samples["lengthscale"]
          .detach()
          .clone()
          .view(model.covar_module.base_kernel.lengthscale.shape)
      )
      model.covar_module.outputscale = (
          mcmc_samples["outputscale"]
          .detach()
          .clone()
          .view(model.covar_module.outputscale.shape)
      )
      model.mean_module.constant.data = (
          mcmc_samples["mean"]
          .detach()
          .clone()
          .view(model.mean_module.constant.shape)
      )
      if "c0" in mcmc_samples:
          model.input_transform._set_concentration(
              i=0,
              value=mcmc_samples["c0"]
              .detach()
              .clone()
              .view(model.input_transform.concentration0.shape),
          )
          model.input_transform._set_concentration(
              i=1,
              value=mcmc_samples["c1"]
              .detach()
              .clone()
              .view(model.input_transform.concentration1.shape),
          )
  
file_path: Ax/ax/models/torch/fully_bayesian_model_utils.py
imports: from typing import Any, Dict, List, Optional, Tuple
  import pyro
  import torch
  from ax.models.torch.botorch_defaults import _get_model
  from botorch.models.gp_regression import MIN_INFERRED_NOISE_LEVEL
  from botorch.models.gpytorch import GPyTorchModel
  from botorch.models.model_list_gp_regression import ModelListGP
  from gpytorch.kernels import MaternKernel, RBFKernel, ScaleKernel
  from torch import Tensor
label_desc: Use image node_id 9 for calling a global function with example usage: load_mcmc_samples_to_model(model, mcmc_samples) without return types