code: def test_temporal_homo_link_neighbor_loader(batch_size):
      data = Data(
          x=torch.randn(10, 5),
          edge_index=torch.randint(0, 10, (2, 123)),
          time=torch.arange(10),
      )
  
      # Ensure that nodes exist at the time of the `edge_label_time`:
      edge_label_time = torch.max(
          data.time[data.edge_index[0]],
          data.time[data.edge_index[1]],
      )
  
      loader = LinkNeighborLoader(
          data,
          num_neighbors=[-1],
          time_attr="time",
          edge_label=torch.ones(data.num_edges),
          edge_label_time=edge_label_time,
          batch_size=batch_size,
          shuffle=True,
      )
  
      for batch in loader:
          assert batch.edge_label_index.size() == (2, batch_size)
          assert batch.edge_label_time.size() == (batch_size,)
          assert batch.edge_label.size() == (batch_size,)
          assert torch.all(batch.time <= batch.edge_label_time)
  
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 6 for calling a global function with example usage: test_temporal_homo_link_neighbor_loader(batch_size) without return types