code: def test_dist_neighbor_loader_homo(
      tmp_path,
      num_parts,
      num_workers,
      async_sampling,
  ):
      mp_context = torch.multiprocessing.get_context("spawn")
      addr = "127.0.0.1"
      with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
          sock.settimeout(1)
          sock.bind((addr, 0))
          port = sock.getsockname()[1]
  
      data = FakeDataset(
          num_graphs=1,
          avg_num_nodes=100,
          avg_degree=3,
          edge_dim=2,
      )[0]
      partitioner = Partitioner(data, num_parts, tmp_path)
      partitioner.generate_partition()
  
      w0 = mp_context.Process(
          target=dist_neighbor_loader_homo,
          args=(
              tmp_path,
              num_parts,
              0,
              addr,
              port,
              num_workers,
              async_sampling,
          ),
      )
  
      w1 = mp_context.Process(
          target=dist_neighbor_loader_homo,
          args=(
              tmp_path,
              num_parts,
              1,
              addr,
              port,
              num_workers,
              async_sampling,
          ),
      )
  
      w0.start()
      w1.start()
      w0.join()
      w1.join()
  
file_path: pytorch_geometric/test/distributed/test_dist_neighbor_loader.py
imports: import socket
  import pytest
  import torch
  import torch.multiprocessing
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.datasets import FakeDataset, FakeHeteroDataset
  from torch_geometric.distributed import DistContext, DistNeighborLoader, DistNeighborSampler, LocalFeatureStore, LocalGraphStore, Partitioner
  from torch_geometric.distributed.partition import load_partition_info
  from torch_geometric.testing import onlyLinux, withPackage
label_desc: Use image node_id 4 for calling a global function with example usage: test_dist_neighbor_loader_homo(tmp_path, num_parts, num_workers, async_sampling) without return types