code: def test(model: torch.nn.Module, loader, device):
      model.eval()
      correct = 0.0
      loss = 0.0
      num_graphs = 0
      for batch in loader:
          batch_graphs, batch_labels = batch
          num_graphs += batch_labels.size(0)
          batch_graphs = batch_graphs.to(device)
          batch_labels = batch_labels.long().to(device)
          out = model(batch_graphs, batch_graphs.ndata["feat"])
          pred = out.argmax(dim=1)
          loss += F.nll_loss(out, batch_labels, reduction="sum").item()
          correct += pred.eq(batch_labels).sum().item()
      return correct / num_graphs, loss / num_graphs
  
file_path: dgl/examples/pytorch/hgp_sl/main.py
imports: import argparse
  import json
  import logging
  import os
  from time import time
  import dgl
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.data import LegacyTUDataset
  from dgl.dataloading import GraphDataLoader
  from networks import HGPSLModel
  from torch.utils.data import random_split
  from utils import get_stats
label_desc: Use image node_id 3 for calling a global function with example usage: test(model, loader, device) and returns: unknown,  unknown