code: def test_pairwiseGP_ranking(self):
      # Test parsing Ranking Dataset for PairwiseGP
      datapoints = rand(3, 2)
      indices = tensor([[0, 1], [1, 2]], dtype=long)
      event_shape = Size([2 * datapoints.shape[-1]])
      dataset_X = SliceContainer(
          datapoints, indices, event_shape=event_shape
      )
      dataset_Y = tensor([[0, 1], [1, 0]]).expand(indices.shape)
      dataset = RankingDataset(
          X=dataset_X,
          Y=dataset_Y,
          feature_names=["a", "b"],
          outcome_names=["y"],
      )
      parse = parse_training_data(PairwiseGP, dataset)
      self.assertTrue(dataset._X.values.equal(parse["datapoints"]))
  
      comparisons = tensor([[0, 1], [2, 1]], dtype=long)
      self.assertTrue(comparisons.equal(parse["comparisons"]))
  
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 2 for calling the TestParseTrainingData obj's underlying member method code with example usage: obj.test_pairwiseGP_ranking() without return types