code: def test_inherit():
      dataset = MyDataset()
      assert len(dataset) == 10
      data = dataset[0]
      assert data.random().size() == (4, 5, 4, 3)
  
      dataset = MyInMemoryDataset()
      assert len(dataset) == 10
      data = dataset[0]
      assert data.random().size() == (4, 5, 4, 3)
  
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 for calling a global function with example usage: test_inherit() without return types