code: def test_fixed_prior_BotorchModel(
      self, dtype: torch.dtype = torch.float, cuda: bool = False
  ) -> None:
      (
          Xs1,
          Ys1,
          Yvars1,
          bounds,
          _,
          feature_names,
          metric_names,
      ) = get_torch_test_data(
          dtype=dtype, cuda=cuda, constant_noise=True
      )
      Xs2, Ys2, Yvars2, _, _, _, _ = get_torch_test_data(
          dtype=dtype, cuda=cuda, constant_noise=True
      )
      kwargs = {
          "prior": {
              "covar_module_prior": {
                  "lengthscale_prior": GammaPrior(6.0, 3.0),
                  "outputscale_prior": GammaPrior(3.0, 12.0),
              },
              "type": LKJCovariancePrior,
              "sd_prior": GammaPrior(2.0, 0.44),
              "eta": 0.6,
          }
      }
      model = BotorchModel(**kwargs)  # pyre-ignore [6]
      datasets = [
          SupervisedDataset(
              X=Xs1[0],
              Y=Ys1[0],
              Yvar=Yvars1[0],
              feature_names=feature_names,
              outcome_names=metric_names,
          ),
          SupervisedDataset(
              X=Xs2[0],
              Y=Ys2[0],
              Yvar=Yvars2[0],
              feature_names=feature_names,
              outcome_names=metric_names,
          ),
      ]
  
      with mock.patch(FIT_MODEL_MO_PATH) as _mock_fit_model:
          model.fit(
              datasets=datasets,
              metric_names=["y", "w"],
              search_space_digest=SearchSpaceDigest(
                  feature_names=feature_names,
                  bounds=bounds,
                  task_features=[0],
              ),
          )
          _mock_fit_model.assert_called_once()
  
      # Check ranks
      model_list = cast(ModelListGP, model.model).models
      for i in range(1):
          self.assertEqual(
              model_list[
                  i
              ].covar_module.base_kernel.lengthscale_prior.concentration,
              6.0,
          )
          self.assertEqual(
              model_list[
                  i
              ].covar_module.base_kernel.lengthscale_prior.rate,
              3.0,
          )
          self.assertEqual(
              model_list[
                  i
              ].covar_module.outputscale_prior.concentration,
              3.0,
          )
          self.assertEqual(
              model_list[i].covar_module.outputscale_prior.rate,
              12.0,
          )
          self.assertIsInstance(
              model_list[i].task_covar_module.IndexKernelPrior,
              LKJCovariancePrior,
          )
          self.assertEqual(
              model_list[
                  i
              ].task_covar_module.IndexKernelPrior.sd_prior.concentration,
              2.0,
          )
          self.assertEqual(
              model_list[
                  i
              ].task_covar_module.IndexKernelPrior.sd_prior.rate,
              0.44,
          )
          self.assertEqual(
              model_list[
                  i
              ].task_covar_module.IndexKernelPrior.correlation_prior.eta,
              0.6,
          )
  
imports: import dataclasses
  from itertools import chain, product
  from typing import Any, cast, Dict
  from unittest import mock
  import numpy
  import torch
  from ax.core.search_space import SearchSpaceDigest
  from ax.exceptions.core import DataRequiredError
  from ax.models.torch.botorch import BotorchModel, get_feature_importances_from_botorch_model, get_rounding_func
  from ax.models.torch.botorch_defaults import get_and_fit_model, get_chebyshev_scalarization, recommend_best_out_of_sample_point
  from ax.models.torch.utils import sample_simplex
  from ax.models.torch_base import TorchOptConfig
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.mock import fast_botorch_optimize
  from ax.utils.testing.torch_stubs import get_torch_test_data
  from botorch.acquisition.utils import get_infeasible_cost
  from botorch.models import ModelListGP, SingleTaskGP
  from botorch.models.transforms.input import Warp
  from botorch.utils.datasets import SupervisedDataset
  from botorch.utils.objective import get_objective_weights_transform
  from gpytorch.likelihoods import _GaussianLikelihoodBase
  from gpytorch.likelihoods.gaussian_likelihood import FixedNoiseGaussianLikelihood
  from gpytorch.mlls import ExactMarginalLogLikelihood, LeaveOneOutPseudoLikelihood
  from gpytorch.priors import GammaPrior
  from gpytorch.priors.lkj_prior import LKJCovariancePrior
label_desc: Use image node_id 2 for calling the BotorchModelTest obj's underlying member method code with example usage: obj.test_fixed_prior_BotorchModel(dtype, cuda) without return types