code: def evaluate(model, features, labels, mask):
      logits = model(features)
      logits = logits[mask].asnumpy().squeeze()
      val_labels = labels[mask].asnumpy().squeeze()
      max_index = np.argmax(logits, axis=1)
      accuracy = np.sum(np.where(max_index == val_labels, 1, 0)) / len(
          val_labels
      )
      return accuracy
  
file_path: dgl/examples/mxnet/gat/train.py
imports: import argparse
  import time
  import dgl
  import mxnet
  import networkx
  import numpy
  from dgl.data import CiteseerGraphDataset, CoraGraphDataset, PubmedGraphDataset, register_data_args
  from gat import GAT
  from mxnet import gluon
  from utils import EarlyStopping
label_desc: Use image node_id 2 for calling a global function with example usage: evaluate(model, features, labels, mask) and returns: accuracy