code: def test_supervised(self):
      with self.assertRaisesRegex(
          NotImplementedError, "Could not find signature"
      ):
          parse_training_data(Model, None)
  
      dataset = SupervisedDataset(
          X=rand(3, 2),
          Y=rand(3, 1),
          feature_names=["a", "b"],
          outcome_names=["y"],
      )
      with self.assertRaisesRegex(
          NotImplementedError, "Could not find signature"
      ):
          parse_training_data(None, dataset)
  
      parse = parse_training_data(Model, dataset)
      self.assertIsInstance(parse, dict)
      self.assertTrue(torch.equal(dataset.X, parse["train_X"]))
      self.assertTrue(torch.equal(dataset.Y, parse["train_Y"]))
      self.assertTrue("train_Yvar" not in parse)
  
      # Test with noise
      dataset = SupervisedDataset(
          X=rand(3, 2),
          Y=rand(3, 1),
          Yvar=rand(3, 1),
          feature_names=["a", "b"],
          outcome_names=["y"],
      )
      parse = parse_training_data(Model, dataset)
      self.assertTrue(torch.equal(dataset.X, parse["train_X"]))
      self.assertTrue(torch.equal(dataset.Y, parse["train_Y"]))
      self.assertTrue(torch.equal(dataset.Yvar, parse["train_Yvar"]))
  
file_path: botorch/test/models/utils/test_parse_training_data.py
imports: import torch
  from botorch.models.model import Model
  from botorch.models.pairwise_gp import PairwiseGP
  from botorch.models.utils.parse_training_data import parse_training_data
  from botorch.utils.containers import SliceContainer
  from botorch.utils.datasets import RankingDataset, SupervisedDataset
  from botorch.utils.testing import BotorchTestCase
  from torch import long, rand, Size, tensor
label_desc: Use image node_id 1 for calling the TestParseTrainingData obj's underlying member method code with example usage: obj.test_supervised() without return types