code: def evaluate(model, data_iter, context):
      metric = mx.metric.Accuracy()
      for _, batch in enumerate(data_iter):
          data = batch[0].as_in_context(context)
          label = batch[1].as_in_context(context)
          output = model(data)
          metric.update([label], [output])
  
      return metric.get()
  
file_path: byteps/example/mxnet/train_gluon_mnist_byteps_gc.py
imports: import argparse
  import logging
  import subprocess
  import time
  import mxnet
  from mxnet import autograd, gluon, nd
  from mxnet.gluon.data.vision import MNIST
  import byteps.mxnet
label_desc: Use image node_id 4 for calling a global function with example usage: evaluate(model, data_iter, context) and returns: metric