code: def test_construct_inputs(self):
      for (
          iteration_fidelity,
          data_fidelities,
      ) in self.FIDELITY_TEST_PAIRS:
          for batch_shape, dtype, lin_trunc in itertools.product(
              (torch.Size(), torch.Size([2])),
              (torch.float, torch.double),
              (False, True),
          ):
              tkwargs = {"device": self.device, "dtype": dtype}
              model, kwargs = self._get_model_and_data(
                  iteration_fidelity=iteration_fidelity,
                  data_fidelities=data_fidelities,
                  batch_shape=batch_shape,
                  m=1,
                  lin_truncated=lin_trunc,
                  **tkwargs,
              )
  
              X = kwargs["train_X"]
              training_data = SupervisedDataset(
                  X=X,
                  Y=kwargs["train_Y"],
                  feature_names=[f"x{i}" for i in range(X.shape[-1])],
                  outcome_names=["y"],
              )
  
              # missing fidelity features
              with self.assertRaisesRegex(
                  TypeError, "argument: 'fidelity_features'"
              ):
                  model.construct_inputs(training_data)
  
              data_dict = model.construct_inputs(
                  training_data, fidelity_features=[1]
              )
              self.assertTrue("data_fidelities" in data_dict)
              self.assertEqual(data_dict["data_fidelities"], [1])
              self.assertTrue(
                  kwargs["train_X"].equal(data_dict["train_X"])
              )
              self.assertTrue(
                  kwargs["train_Y"].equal(data_dict["train_Y"])
              )
  
imports: import itertools
  import warnings
  from typing import Tuple
  import torch
  from botorch.exceptions.errors import UnsupportedError
  from botorch.exceptions.warnings import OptimizationWarning
  from botorch.fit import fit_gpytorch_mll
  from botorch.models.gp_regression_fidelity import FixedNoiseMultiFidelityGP, SingleTaskMultiFidelityGP
  from botorch.models.transforms import Normalize, Standardize
  from botorch.posteriors import GPyTorchPosterior
  from botorch.sampling import SobolQMCNormalSampler
  from botorch.utils.datasets import SupervisedDataset
  from botorch.utils.testing import _get_random_data, BotorchTestCase
  from gpytorch.kernels.scale_kernel import ScaleKernel
  from gpytorch.likelihoods import FixedNoiseGaussianLikelihood
  from gpytorch.means import ConstantMean
  from gpytorch.mlls.exact_marginal_log_likelihood import ExactMarginalLogLikelihood
  from torch import Tensor
label_desc: Use image node_id 7 for calling the TestSingleTaskMultiFidelityGP obj's underlying member method code with example usage: obj.test_construct_inputs() without return types