code: def test(loader):
      model.eval()
  
      y_pred, y_true = [], []
      for data in loader:
          data = data.to(device)
          logits = model(data.x, data.edge_index, data.batch)
          y_pred.append(logits.view(-1).cpu())
          y_true.append(data.y.view(-1).cpu().to(torch.float))
  
      return roc_auc_score(torch.cat(y_true), torch.cat(y_pred))
  
imports: import math
  import os.path
  import time
  from itertools import chain
  import numpy
  import torch
  import torch.nn.functional
  from scipy.sparse.csgraph import shortest_path
  from sklearn.metrics import roc_auc_score
  from torch.nn import BCEWithLogitsLoss, Conv1d, MaxPool1d, ModuleList
  from torch_geometric.data import Data, InMemoryDataset
  from torch_geometric.datasets import Planetoid
  from torch_geometric.loader import DataLoader
  from torch_geometric.nn import MLP, GCNConv, SortAggregation
  from torch_geometric.transforms import RandomLinkSplit
  from torch_geometric.utils import k_hop_subgraph, to_scipy_sparse_matrix
label_desc: Use image node_id 2 for calling a global function with example usage: test(loader) and returns: roc_auc_score