code: def test_basic_gnn_inference(get_dataset, jk):
      dataset = get_dataset(name="Cora")
      data = dataset[0]
  
      model = GraphSAGE(
          dataset.num_features,
          hidden_channels=16,
          num_layers=2,
          out_channels=dataset.num_classes,
          jk=jk,
      )
      model.eval()
  
      out1 = model(data.x, data.edge_index)
      assert out1.size() == (data.num_nodes, dataset.num_classes)
  
      loader = NeighborLoader(data, num_neighbors=[-1], batch_size=128)
      out2 = model.inference(loader)
      assert out1.size() == out2.size()
      assert torch.allclose(out1, out2, atol=1e-4)
  
      assert "n_id" not in data
  
imports: import os
  import os.path
  import random
  import sys
  import warnings
  import pytest
  import torch
  import torch.nn.functional
  import torch_geometric.typing
  from torch_geometric.data import Data
  from torch_geometric.loader import NeighborLoader
  from torch_geometric.nn import SAGEConv
  from torch_geometric.nn.models import GAT, GCN, GIN, PNA, EdgeCNN, GraphSAGE
  from torch_geometric.profile import benchmark
  from torch_geometric.testing import onlyFullTest, onlyLinux, onlyNeighborSampler, onlyOnline, withCUDA, withPackage
label_desc: Use image node_id 10 for calling a global function with example usage: test_basic_gnn_inference(get_dataset, jk) without return types