code: def test_link_neighbor_loader_mapping():
      edge_index = torch.tensor(
          [
              [0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 5],
              [1, 2, 3, 4, 5, 8, 6, 7, 9, 10, 6, 11],
          ]
      )
      data = Data(edge_index=edge_index, num_nodes=12)
  
      loader = LinkNeighborLoader(
          data,
          edge_label_index=data.edge_index,
          num_neighbors=[1],
          batch_size=2,
          shuffle=True,
      )
  
      for batch in loader:
          assert torch.equal(
              batch.n_id[batch.edge_index],
              data.edge_index[:, batch.e_id],
          )
  
file_path: pytorch_geometric/test/loader/test_link_neighbor_loader.py
imports: import pytest
  import torch
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.loader import LinkNeighborLoader
  from torch_geometric.testing import MyFeatureStore, MyGraphStore, get_random_edge_index, onlyNeighborSampler, withCUDA, withPackage
label_desc: Use image node_id 13 for calling a global function with example usage: test_link_neighbor_loader_mapping() without return types