code: def test(model, device, loader, evaluator):
      model.eval()
  
      y_pred, y_true = [], []
      for x, y in tqdm(loader):
          x = x.to(device)
          out = model(x)
  
          y_pred.append(torch.argmax(out, dim=1, keepdim=True).cpu())
          y_true.append(y)
  
      return evaluator.eval(
          {
              "y_true": torch.cat(y_true, dim=0),
              "y_pred": torch.cat(y_pred, dim=0),
          }
      )["acc"]
  
file_path: ogb/examples/nodeproppred/papers100M/mlp.py
imports: import argparse
  from tqdm.auto import tqdm
  import torch
  import torch.nn.functional
  from torch.utils.data import Dataset, DataLoader
  from ogb.nodeproppred import Evaluator
  from logger import Logger
label_desc: Use image node_id 2 for calling a global function with example usage: test(model, device, loader, evaluator) and returns: evaluator