code: def _gen_datasets(
      infer_noise: bool = False,
      **tkwargs,
  ) -> Tuple[
      Dict[int, SupervisedDataset], Tuple[Tensor, Tensor, Tensor]
  ]:
      train_X = torch.tensor(
          [
              [0.0, 0.0, 0.0, 0.0],
              [1.0, 1.0, 1.0, 1.0],
              [2.0, 2.0, 2.0, 2.0],
          ],
          **tkwargs,
      )
      train_Y = torch.tensor([[1.0], [2.0], [3.0]], **tkwargs)
      train_Yvar = (
          None if infer_noise else torch.full_like(train_Y, 0.01)
      )
  
      datasets = SupervisedDataset(
          X=train_X,
          Y=train_Y,
          Yvar=train_Yvar,
          feature_names=[f"x{i}" for i in range(train_X.shape[-1])],
          outcome_names=["y"],
      )
      return datasets, (train_X, train_Y, train_Yvar)
  
imports: from typing import Dict, Tuple
  import torch
  from botorch.fit import fit_gpytorch_mll
  from botorch.models.contextual import LCEAGP, SACGP
  from botorch.models.gp_regression import SingleTaskGP
  from botorch.models.kernels.contextual_lcea import LCEAKernel
  from botorch.models.kernels.contextual_sac import SACKernel
  from botorch.utils.datasets import SupervisedDataset
  from botorch.utils.testing import BotorchTestCase
  from gpytorch.distributions.multivariate_normal import MultivariateNormal
  from gpytorch.likelihoods.gaussian_likelihood import FixedNoiseGaussianLikelihood, GaussianLikelihood
  from gpytorch.means import ConstantMean
  from gpytorch.mlls.exact_marginal_log_likelihood import ExactMarginalLogLikelihood
  from torch import Tensor
label_desc: Use image node_id 1 for calling a global function with example usage: _gen_datasets(infer_noise) and returns: datasets,  train_X,  train_Y,  train_Yvar