code: def test(model, data, split_idx, evaluator):
      model.eval()
  
      out = model(data.x, data.adj_t)
      y_pred = out.argmax(dim=-1, keepdim=True)
  
      train_acc = evaluator.eval(
          {
              "y_true": data.y[split_idx["train"]],
              "y_pred": y_pred[split_idx["train"]],
          }
      )["acc"]
      valid_acc = evaluator.eval(
          {
              "y_true": data.y[split_idx["valid"]],
              "y_pred": y_pred[split_idx["valid"]],
          }
      )["acc"]
      test_acc = evaluator.eval(
          {
              "y_true": data.y[split_idx["test"]],
              "y_pred": y_pred[split_idx["test"]],
          }
      )["acc"]
  
      return train_acc, valid_acc, test_acc
  
file_path: graph4nlp/graph4nlp/pytorch/test/graph_embedding/ogbn_test.py
imports: import argparse
  import torch
  import torch.nn.functional
  import torch_geometric.transforms
  from ogb.nodeproppred import Evaluator, PygNodePropPredDataset
  from torch_geometric.nn import GCNConv, SAGEConv
  from .logger import Logger
label_desc: Use image node_id 2 for calling a global function with example usage: test(model, data, split_idx, evaluator) and returns: train_acc,  valid_acc,  test_acc