code: def test_hetero_neighbor_loader_on_cora(get_dataset, subgraph_type):
      if (
          subgraph_type == SubgraphType.induced
          and not WITH_TORCH_SPARSE
      ):
          return
      dataset = get_dataset(name="Cora")
      data = dataset[0]
  
      hetero_data = HeteroData()
      hetero_data["paper"].x = data.x
      hetero_data["paper", "paper"].edge_index = data.edge_index
  
      split_idx = torch.arange(5, 8)
  
      loader = NeighborLoader(
          hetero_data,
          num_neighbors=[-1, -1],
          batch_size=split_idx.numel(),
          input_nodes=("paper", split_idx),
          subgraph_type=subgraph_type,
      )
      assert len(loader) == 1
  
      hetero_batch = next(iter(loader))
      batch_size = hetero_batch["paper"].batch_size
  
      class GNN(torch.nn.Module):
          def __init__(
              self, in_channels, hidden_channels, out_channels
          ):
              super().__init__()
              self.conv1 = GraphConv(in_channels, hidden_channels)
              self.conv2 = GraphConv(hidden_channels, out_channels)
  
          def forward(self, x, edge_index):
              x = self.conv1(x, edge_index).relu()
              x = self.conv2(x, edge_index)
              return x
  
      model = GNN(dataset.num_features, 16, dataset.num_classes)
      hetero_model = to_hetero(model, hetero_data.metadata())
  
      out1 = model(data.x, data.edge_index)[split_idx]
      out2 = hetero_model(
          hetero_batch.x_dict, hetero_batch.edge_index_dict
      )["paper"][:batch_size]
      assert torch.allclose(out1, out2, atol=1e-6)
  
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 5 for calling a global function with example usage: test_hetero_neighbor_loader_on_cora(get_dataset, subgraph_type) and returns: x