code: def evaluate(g, pred):
      label = g.ndata["label"]
      val_mask = g.ndata["val_mask"]
      test_mask = g.ndata["test_mask"]
  
      # Compute accuracy on validation/test set.
      val_acc = (pred[val_mask] == label[val_mask]).float().mean()
      test_acc = (pred[test_mask] == label[test_mask]).float().mean()
      return val_acc, test_acc
  
file_path: dgl/examples/sparse/sgc.py
imports: import dgl.sparse
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.data import CoraGraphDataset
  from torch.optim import Adam
label_desc: Use image node_id 2 for calling a global function with example usage: evaluate(g, pred) and returns: val_acc,  test_acc