code: def get_gp(
      n_dimensions, rs, noise=None, normalize_y=True
  ) -> GPyTorchGaussianProcess:
      exp_kernel = MaternKernel(
          2.5,
          lengthscale_constraint=Interval(
              torch.tensor(
                  np.exp(-6.754111155189306).repeat(n_dimensions)
              ),
              torch.tensor(
                  np.exp(0.0858637988771976).repeat(n_dimensions)
              ),
              transform=None,
              initial_value=1.0,
          ),
          ard_num_dims=n_dimensions,
          active_dims=torch.arange(n_dimensions),
          lengthscale_prior=UniformPrior(
              np.exp(-6.754111155189306), np.exp(0.858637988771976)
          ),
      ).double()
  
      kernel = ScaleKernel(
          exp_kernel,
          outputscale_constraint=Interval(
              np.exp(-10.0),
              np.exp(2.0),
              transform=None,
              initial_value=2.0,
          ),
          outputscale_prior=LogNormalPrior(0.0, 1.0),
      ).double()
      if noise is None:
          likelihood = None
      else:
          noise_prior = HorseshoePrior(0.1)
          likelihood = GaussianLikelihood(
              noise_prior=noise_prior,
              noise_constraint=Interval(
                  np.exp(-25), np.exp(2), transform=None
              ),
          ).double()
          likelihood.initialize(noise=noise)
  
      bounds = [(0.0, 1.0) for _ in range(n_dimensions)]
      types = np.zeros(n_dimensions)
  
      configspace = ConfigurationSpace()
      for i in range(n_dimensions):
          configspace.add_hyperparameter(
              UniformFloatHyperparameter("x%d" % i, 0, 1)
          )
  
      model = GPyTorchGaussianProcess(
          configspace=configspace,
          bounds=bounds,
          types=types,
          kernel=kernel,
          seed=rs.randint(low=1, high=10000),
          normalize_y=normalize_y,
          likelihood=likelihood,
          n_opt_restarts=2,
      )
      return model
  
imports: import unittest.mock
  import numpy
  import pyro
  import torch
  from botorch.models.kernels.categorical import CategoricalKernel
  from gpytorch.constraints.constraints import Interval
  from gpytorch.kernels import MaternKernel, ProductKernel, ScaleKernel
  from gpytorch.likelihoods.gaussian_likelihood import GaussianLikelihood
  from gpytorch.mlls.exact_marginal_log_likelihood import ExactMarginalLogLikelihood
  from gpytorch.models.exact_gp import ExactGP
  from gpytorch.priors import HorseshoePrior, LogNormalPrior, UniformPrior
  from gpytorch.utils.errors import NotPSDError
  from smac.configspace import CategoricalHyperparameter, ConfigurationSpace, UniformFloatHyperparameter
  from smac.model.gaussian_process.gpytorch_gaussian_process import GPyTorchGaussianProcess
  from ._test_gp import TestGP, get_cat_data, get_cont_data
label_desc: Use image node_id 1 for calling a global function with example usage: get_gp(n_dimensions, rs, noise, normalize_y) and returns: model