code: def test(epoch):
      model.eval()
  
      y_true = {"train": [], "valid": [], "test": []}
      y_pred = {"train": [], "valid": [], "test": []}
  
      pbar = tqdm(total=len(test_loader))
      pbar.set_description(f"Evaluating epoch: {epoch:03d}")
  
      for data in test_loader:
          # Memory-efficient aggregations
          data = transform(data)
          out = model(data.x, data.adj_t).argmax(dim=-1, keepdim=True)
  
          for split in ["train", "valid", "test"]:
              mask = data[f"{split}_mask"]
              y_true[split].append(data.y[mask].cpu())
              y_pred[split].append(out[mask].cpu())
  
          pbar.update(1)
  
      pbar.close()
  
      train_acc = evaluator.eval(
          {
              "y_true": torch.cat(y_true["train"], dim=0),
              "y_pred": torch.cat(y_pred["train"], dim=0),
          }
      )["acc"]
  
      valid_acc = evaluator.eval(
          {
              "y_true": torch.cat(y_true["valid"], dim=0),
              "y_pred": torch.cat(y_pred["valid"], dim=0),
          }
      )["acc"]
  
      test_acc = evaluator.eval(
          {
              "y_true": torch.cat(y_true["test"], dim=0),
              "y_pred": torch.cat(y_pred["test"], dim=0),
          }
      )["acc"]
  
      return train_acc, valid_acc, test_acc
  
imports: import os.path
  import time
  import torch
  import torch.nn.functional
  from ogb.nodeproppred import Evaluator, PygNodePropPredDataset
  from torch.nn import LayerNorm, Linear
  from tqdm import tqdm
  import torch_geometric.transforms
  from torch_geometric.loader import RandomNodeLoader
  from torch_geometric.nn import GroupAddRev, SAGEConv
  from torch_geometric.utils import index_to_mask
label_desc: Use image node_id 2 for calling a global function with example usage: test(epoch) and returns: train_acc,  valid_acc,  test_acc