code: def dist_neighbor_loader_homo(
      tmp_path: str,
      world_size: int,
      rank: int,
      master_addr: str,
      master_port: int,
      num_workers: int,
      async_sampling: bool,
  ):
      part_data = create_dist_data(tmp_path, rank)
      input_nodes = part_data[0].get_global_id(None)
      current_ctx = DistContext(
          rank=rank,
          global_rank=rank,
          world_size=world_size,
          global_world_size=world_size,
          group_name="dist-loader-test",
      )
  
      loader = DistNeighborLoader(
          part_data,
          num_neighbors=[1],
          batch_size=10,
          num_workers=num_workers,
          input_nodes=input_nodes,
          master_addr=master_addr,
          master_port=master_port,
          current_ctx=current_ctx,
          concurrency=10,
          drop_last=True,
          async_sampling=async_sampling,
      )
  
      edge_index = part_data[1]._edge_index[(None, "coo")]
  
      assert str(loader).startswith("DistNeighborLoader")
      assert str(mp.current_process().pid) in str(loader)
      assert isinstance(loader.dist_sampler, DistNeighborSampler)
      assert not part_data[0].meta["is_hetero"]
  
      for batch in loader:
          assert isinstance(batch, Data)
          assert batch.n_id.size() == (batch.num_nodes,)
          assert batch.input_id.numel() == batch.batch_size == 10
          assert batch.edge_index.min() >= 0
          assert batch.edge_index.max() < batch.num_nodes
          assert torch.equal(
              batch.n_id[batch.edge_index],
              edge_index[:, batch.e_id],
          )
      assert loader.channel.empty()
  
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 2 for calling a global function with example usage: dist_neighbor_loader_homo(tmp_path, world_size, rank, master_addr, master_port, num_workers, async_sampling) without return types