code: def test():
      model.eval()
  
      out = model.inference(data.x)
  
      y_true = data.y.cpu()
      y_pred = out.argmax(dim=-1, keepdim=True)
  
      train_acc = evaluator.eval(
          {
              "y_true": y_true[split_idx["train"]],
              "y_pred": y_pred[split_idx["train"]],
          }
      )["acc"]
      val_acc = evaluator.eval(
          {
              "y_true": y_true[split_idx["valid"]],
              "y_pred": y_pred[split_idx["valid"]],
          }
      )["acc"]
      test_acc = evaluator.eval(
          {
              "y_true": y_true[split_idx["test"]],
              "y_pred": y_pred[split_idx["test"]],
          }
      )["acc"]
  
      return train_acc, val_acc, test_acc
  
file_path: pytorch_geometric/examples/ogbn_products_gat.py
imports: import os.path
  import torch
  import torch.nn.functional
  from ogb.nodeproppred import Evaluator, PygNodePropPredDataset
  from torch.nn import Linear
  from tqdm import tqdm
  from torch_geometric.loader import NeighborLoader
  from torch_geometric.nn import GATConv
label_desc: Use image node_id 2 for calling a global function with example usage: test() and returns: train_acc,  val_acc,  test_acc