code: def test_data_loader(dtype, num_workers):
      kwargs = dict(dtype=dtype)
      adj = EdgeIndex(
          [[0, 1, 1, 2], [1, 0, 2, 1]], sort_order="row", **kwargs
      )
      adj.fill_cache_()
  
      loader = torch.utils.data.DataLoader(
          [adj] * 4,
          batch_size=2,
          num_workers=num_workers,
          collate_fn=_collate_fn,
          drop_last=True,
      )
  
      assert len(loader) == 2
      for batch in loader:
          assert isinstance(batch, list)
          assert len(batch) == 2
          for adj in batch:
              assert isinstance(adj, EdgeIndex)
              assert adj.dtype == adj.dtype
              assert adj.is_shared() == (num_workers > 0)
              assert adj._indptr.is_shared() == (num_workers > 0)
  
imports: import os.path
  import warnings
  from typing import List, Optional
  import pytest
  import torch
  from torch import Tensor, tensor
  import torch_geometric
  from torch_geometric import EdgeIndex
  from torch_geometric.edge_index import SUPPORTED_DTYPES, ReduceType, SortReturnType, _scatter_spmm, _torch_sparse_spmm, _TorchSPMM, set_tuple_item
  from torch_geometric.profile import benchmark
  from torch_geometric.testing import onlyCUDA, onlyLinux, withCUDA, withoutExtensions, withPackage
  from torch_geometric.typing import SparseTensor
  from torch_geometric.utils import scatter
label_desc: Use image node_id 33 for calling a global function with example usage: test_data_loader(dtype, num_workers) without return types