code: def evaluate(model, data_iter, context):
      data_iter.reset()
      metric = mx.gluon.metric.Accuracy()
      for _, batch in enumerate(data_iter):
          data = batch.data[0].as_in_context(context)
          label = batch.label[0].as_in_context(context)
          output = model(data.astype(args.dtype, copy=False))
          metric.update([label], [output])
  
      return metric.get()
  
file_path: mxnet/example/distributed_training-horovod/gluon_mnist.py
imports: import argparse
  import logging
  import os
  import zipfile
  import time
  import mxnet
  import horovod.mxnet
  from mxnet import autograd, gluon, nd
  from mxnet.test_utils import download
label_desc: Use image node_id 3 for calling a global function with example usage: evaluate(model, data_iter, context) and returns: metric