code: def evaluate(model, data):
      model.eval()
  
      out = model(data)
  
      outs = {}
      for key in ["train", "val", "test"]:
          mask = data[f"{key}_mask"]
          loss = float(F.nll_loss(out[mask], data.y[mask]))
          pred = out[mask].argmax(1)
          acc = pred.eq(data.y[mask]).sum().item() / mask.sum().item()
  
          outs[f"{key}_loss"] = loss
          outs[f"{key}_acc"] = acc
  
      return outs
  
file_path: pytorch_geometric/benchmark/citation/train_eval.py
imports: import time
  import torch
  import torch.nn.functional
  from torch import tensor
  from torch.optim import Adam
  from torch_geometric.profile import timeit, torch_profile
  from torch_geometric.utils import index_to_mask
label_desc: Use image node_id 6 for calling a global function with example usage: evaluate(model, data) and returns: outs