code: def _get_torch_test_data(
      dtype: torch.dtype = torch.float,
      cuda: bool = False,
      constant_noise: bool = True,
      # pyre-fixme[2]: Parameter must be annotated.
      task_features=None,
  ):
      device = torch.device("cuda") if cuda else torch.device("cpu")
      Xs = [
          torch.tensor(
              [[1.0, 2.0, 3.0], [2.0, 3.0, 4.0]],
              dtype=dtype,
              device=device,
          )
      ]
      Ys = [torch.tensor([[3.0], [4.0]], dtype=dtype, device=device)]
      Yvars = [torch.tensor([[0.0], [2.0]], dtype=dtype, device=device)]
      if constant_noise:
          Yvars[0].fill_(1.0)
      bounds = [(0.0, 1.0), (1.0, 4.0), (2.0, 5.0)]
      feature_names = ["x1", "x2", "x3"]
      task_features = [] if task_features is None else task_features
      metric_names = ["y"]
      return (
          Xs,
          Ys,
          Yvars,
          bounds,
          task_features,
          feature_names,
          metric_names,
      )
  
imports: import dataclasses
  from contextlib import ExitStack
  from typing import Any, Dict
  from unittest import mock
  import ax.models.torch.botorch_moo_defaults
  import botorch.utils.multi_objective.hypervolume
  import numpy
  import torch
  from ax.core.search_space import SearchSpaceDigest
  from ax.exceptions.core import AxError
  from ax.models.torch.botorch_defaults import get_qLogNEI
  from ax.models.torch.botorch_moo import MultiObjectiveBotorchModel
  from ax.models.torch.botorch_moo_defaults import get_EHVI, get_NEHVI, get_qLogEHVI, get_qLogNEHVI, infer_objective_thresholds
  from ax.models.torch.utils import HYPERSPHERE
  from ax.models.torch_base import TorchOptConfig
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.mock import fast_botorch_optimize
  from botorch.acquisition.multi_objective import logei, monte_carlo
  from botorch.models import ModelListGP
  from botorch.models.transforms.input import Warp
  from botorch.optim.optimize import optimize_acqf_list
  from botorch.sampling.normal import IIDNormalSampler
  from botorch.utils.datasets import SupervisedDataset
  from botorch.utils.multi_objective.hypervolume import infer_reference_point
  from botorch.utils.multi_objective.scalarization import get_chebyshev_scalarization
  from botorch.utils.testing import MockModel, MockPosterior
label_desc: Use image node_id 2 for calling a global function with example usage: _get_torch_test_data(dtype, cuda, constant_noise, task_features) and returns: Xs,  Ys,  Yvars,  bounds,  task_features,  feature_names,  metric_names