code: def test_FixedNoiseLCEMGP(self):
      d = 1
      for dtype in (torch.float, torch.double):
          train_x = torch.rand(10, d, device=self.device, dtype=dtype)
          train_y = torch.cos(train_x)
          task_indices = torch.tensor(
              [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0],
              device=self.device,
          )
          train_x = torch.cat(
              [train_x, task_indices.unsqueeze(-1)], axis=1
          )
          train_yvar = (
              torch.ones(10, 1, device=self.device, dtype=dtype) * 0.01
          )
  
          with self.assertWarnsRegex(
              DeprecationWarning, "FixedNoiseLCEMGP"
          ):
              model = FixedNoiseLCEMGP(
                  train_X=train_x,
                  train_Y=train_y,
                  train_Yvar=train_yvar,
                  task_feature=d,
              )
          mll = ExactMarginalLogLikelihood(model.likelihood, model)
          fit_gpytorch_mll(
              mll, optimizer_kwargs={"options": {"maxiter": 1}}
          )
  
          self.assertIsInstance(model, FixedNoiseLCEMGP)
  
          test_x = torch.rand(5, d, device=self.device, dtype=dtype)
          task_indices = torch.tensor(
              [0.0, 0.0, 0.0, 0.0, 0.0], device=self.device, dtype=dtype
          )
          test_x = torch.cat(
              [test_x, task_indices.unsqueeze(-1)],
              axis=1,
          )
          self.assertIsInstance(model(test_x), MultivariateNormal)
  
file_path: botorch/test/models/test_contextual_multioutput.py
imports: import torch
  from botorch.fit import fit_gpytorch_mll
  from botorch.models.contextual_multioutput import FixedNoiseLCEMGP, LCEMGP
  from botorch.models.multitask import MultiTaskGP
  from botorch.posteriors import GPyTorchPosterior
  from botorch.utils.testing import BotorchTestCase
  from gpytorch.distributions import MultitaskMultivariateNormal, MultivariateNormal
  from gpytorch.mlls.exact_marginal_log_likelihood import ExactMarginalLogLikelihood
  from linear_operator.operators import LinearOperator
  from torch import Tensor
label_desc: Use image node_id 2 for calling the ContextualMultiOutputTest obj's underlying member method code with example usage: obj.test_FixedNoiseLCEMGP() without return types