code: def test_stored_hetero_in_memory_dataset(tmp_path):
      x1 = torch.tensor([[1.0], [1.0], [1.0]])
      x2 = torch.tensor([[2.0], [2.0], [2.0], [2.0]])
  
      data1 = HeteroData()
      data1["paper"].x = x1
      data1["paper"].num_nodes = 3
  
      data2 = HeteroData()
      data2["paper"].x = x2
      data2["paper"].num_nodes = 4
  
      dataset = MyStoredTestDataset(tmp_path, [data1, data2])
      assert dataset._data["paper"].num_nodes == 7
      assert dataset._data["paper"]._num_nodes == [3, 4]
  
      assert torch.equal(dataset[0]["paper"].x, x1)
      assert dataset[0]["paper"].num_nodes == 3
  
      assert torch.equal(dataset[1]["paper"].x, x2)
      assert dataset[1]["paper"].num_nodes == 4
  
imports: import copy
  import pytest
  import torch
  from torch_geometric import EdgeIndex
  from torch_geometric.data import Data, HeteroData, InMemoryDataset
  from torch_geometric.datasets import KarateClub
  from torch_geometric.testing import withPackage
  from torch_geometric.transforms import BaseTransform
  from torch_geometric.typing import SparseTensor
label_desc: Use image node_id 3 for calling a global function with example usage: test_stored_hetero_in_memory_dataset(tmp_path) without return types