code: def __init__(self):
      dataset = DglGraphPropPredDataset(name="ogbg-molhiv")
      split_idx = dataset.get_idx_split()
  
      # Compute the shortest path distances and their corresponding paths
      # of all graphs during preprocessing.
      for g, label in dataset:
          spd, path = shortest_dist(g, root=None, return_paths=True)
          g.ndata["spd"] = spd
          g.ndata["path"] = path
  
      self.train, self.val, self.test = (
          dataset[split_idx["train"]],
          dataset[split_idx["valid"]],
          dataset[split_idx["test"]],
      )
  
file_path: dgl/examples/core/Graphormer/dataset.py
imports: import torch
  import torch.nn.functional
  from dgl import shortest_dist
  from ogb.graphproppred import DglGraphPropPredDataset
  from torch.nn.utils.rnn import pad_sequence
label_desc: Use image node_id 1 to create a new MolHIVDataset object from inherited base classes: th.utils.data with example: obj = MolHIVDataset()