code: def test_heterogeneous_dataloader(num_workers):
      data = HeteroData()
      data["p"].x = torch.randn(100, 128)
      data["a"].x = torch.randn(200, 128)
      data["p", "a"].edge_index = get_random_edge_index(100, 200, 500)
      data["p"].edge_attr = torch.randn(500, 32)
      data["a", "p"].edge_index = get_random_edge_index(200, 100, 400)
      data["a", "p"].edge_attr = torch.randn(400, 32)
  
      loader = DataLoader(
          [data, data, data, data],
          batch_size=2,
          shuffle=False,
          num_workers=num_workers,
      )
      assert len(loader) == 2
  
      for batch in loader:
          assert batch.num_graphs == len(batch) == 2
          assert batch.num_nodes == 600
  
          for store in batch.stores:
              assert id(batch) == id(store._parent())
  
file_path: pytorch_geometric/test/loader/test_dataloader.py
imports: import multiprocessing
  import sys
  from collections import namedtuple
  import pytest
  import torch
  from torch_geometric import EdgeIndex
  from torch_geometric.data import Data, HeteroData, OnDiskDataset
  from torch_geometric.loader import DataLoader
  from torch_geometric.testing import get_random_edge_index, get_random_tensor_frame, withCUDA, withPackage
label_desc: Use image node_id 6 for calling a global function with example usage: test_heterogeneous_dataloader(num_workers) without return types