code: def __init__(self):
      super().__init__("/tmp/MyInMemoryDataset")
  
      x = torch.randn(4, 5)
      edge_index = torch.tensor([[0, 0, 0], [1, 2, 3]])
      arg = torch.randn(4, 3)
  
      data_list = [MyData(x, edge_index, arg) for _ in range(10)]
      self.data, self.slices = self.collate(data_list)
  
file_path: pytorch_geometric/test/data/test_inherit.py
imports: import torch
  from torch_geometric.data import Data, Dataset, InMemoryDataset
label_desc: Use image node_id 1 to create a new MyInMemoryDataset object from inherited base classes: InMemoryDataset with example: obj = MyInMemoryDataset()