code: def test_lists_of_tensors_in_memory_dataset():
      def tr(n, m):
          return torch.rand((n, m))
  
      d1 = Data(xs=[tr(4, 3), tr(11, 4), tr(1, 2)])
      d2 = Data(xs=[tr(5, 3), tr(14, 4), tr(3, 2)])
      d3 = Data(xs=[tr(6, 3), tr(15, 4), tr(2, 2)])
      d4 = Data(xs=[tr(4, 3), tr(16, 4), tr(1, 2)])
  
      data_list = [d1, d2, d3, d4]
  
      dataset = MyTestDataset(data_list)
      assert len(dataset) == 4
      assert dataset[0].xs[1].size() == (11, 4)
      assert dataset[0].xs[2].size() == (1, 2)
      assert dataset[1].xs[0].size() == (5, 3)
      assert dataset[2].xs[1].size() == (15, 4)
      assert dataset[3].xs[1].size() == (16, 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 12 for calling a global function with example usage: test_lists_of_tensors_in_memory_dataset() and returns: torch