code: def test_temporal_custom_neighbor_loader_on_cora(get_dataset):
      # Initialize dataset (once):
      dataset = get_dataset(name="Cora")
      data = dataset[0]
      data.time = torch.arange(data.num_nodes, 0, -1)
  
      # Initialize feature store, graph store, and reference:
      feature_store = MyFeatureStore()
      graph_store = MyGraphStore()
      hetero_data = HeteroData()
  
      feature_store.put_tensor(
          data.x,
          group_name="paper",
          attr_name="x",
          index=None,
      )
      hetero_data["paper"].x = data.x
  
      feature_store.put_tensor(
          data.time,
          group_name="paper",
          attr_name="time",
          index=None,
      )
      hetero_data["paper"].time = data.time
  
      # Sort according to time in local neighborhoods:
      row, col = data.edge_index
      perm = ((col * (data.num_nodes + 1)) + data.time[row]).argsort()
      edge_index = data.edge_index[:, perm]
  
      graph_store.put_edge_index(
          edge_index,
          edge_type=("paper", "to", "paper"),
          layout="coo",
          is_sorted=True,
          size=(data.num_nodes, data.num_nodes),
      )
      hetero_data["paper", "to", "paper"].edge_index = data.edge_index
  
      loader1 = NeighborLoader(
          hetero_data,
          num_neighbors=[-1, -1],
          input_nodes="paper",
          time_attr="time",
          batch_size=128,
      )
  
      loader2 = NeighborLoader(
          (feature_store, graph_store),
          num_neighbors=[-1, -1],
          input_nodes="paper",
          time_attr="time",
          batch_size=128,
      )
  
      for batch1, batch2 in zip(loader1, loader2):
          assert torch.equal(batch1["paper"].time, batch2["paper"].time)
  
imports: import os.path
  import numpy
  import pytest
  import torch
  import torch_geometric.typing
  from torch_geometric import EdgeIndex
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.loader import NeighborLoader
  from torch_geometric.nn import GraphConv, to_hetero
  from torch_geometric.sampler.base import SubgraphType
  from torch_geometric.testing import MyFeatureStore, MyGraphStore, get_random_edge_index, get_random_tensor_frame, onlyLinux, onlyNeighborSampler, onlyOnline, withCUDA, withPackage
  from torch_geometric.typing import WITH_EDGE_TIME_NEIGHBOR_SAMPLE, WITH_PYG_LIB, WITH_TORCH_SPARSE, WITH_WEIGHTED_NEIGHBOR_SAMPLE, TensorFrame
  from torch_geometric.utils import is_undirected, sort_edge_index, to_torch_csr_tensor, to_undirected
label_desc: Use image node_id 9 for calling a global function with example usage: test_temporal_custom_neighbor_loader_on_cora(get_dataset) without return types