code: def _parse_pairwiseGP_ranking(
      consumer: PairwiseGP, dataset: RankingDataset, **ignore: Any
  ) -> Dict[str, Tensor]:
      # TODO: [T163045056] Not sure what the point of the special container is if we have
      # to further process it here. We should move this logic into RankingDataset.
      datapoints = dataset._X.values
      comparisons = dataset._X.indices
      comp_order = dataset.Y
      comparisons = torch.gather(
          input=comparisons, dim=-1, index=comp_order
      )
  
      return {
          "datapoints": datapoints,
          "comparisons": comparisons,
      }
  
file_path: botorch/botorch/models/utils/parse_training_data.py
imports: from __future__ import annotations
  from typing import Any, Dict, Type
  import torch
  from botorch.models.model import Model
  from botorch.models.pairwise_gp import PairwiseGP
  from botorch.utils.datasets import RankingDataset, SupervisedDataset
  from botorch.utils.dispatcher import Dispatcher
  from torch import Tensor
label_desc: Use image node_id 4 for calling a global function with example usage: _parse_pairwiseGP_ranking(consumer, dataset) and returns: dict