code: def test():
      model.eval()
      pred = model(data.x, data.edge_index, data.edge_type).argmax(
          dim=-1
      )
      train_acc = float(
          (pred[data.train_idx] == data.train_y).float().mean()
      )
      test_acc = float(
          (pred[data.test_idx] == data.test_y).float().mean()
      )
      return train_acc, test_acc
  
file_path: pytorch_geometric/examples/rgat.py
imports: import os.path
  import time
  import torch
  import torch.nn.functional
  from torch_geometric.datasets import Entities
  from torch_geometric.nn import RGATConv
label_desc: Use image node_id 2 for calling a global function with example usage: test() and returns: train_acc,  test_acc