code: def test():
      correct = 0
      dy.renew_cg()
      losses = []
      for lbl, img in test_data:
          losses.append(
              network.create_network_return_loss(
                  img, lbl, dropout=False
              )
          )
          if lbl == network.create_network_return_best(
              img, dropout=False
          ):
              correct += 1
      mbloss = dy.average(losses)
      print(
          "\nTest set: Average loss: {:.4f}, Accuracy: {}/{} ({:.0f}%)\n".format(
              mbloss.value(),
              correct,
              len(test_data),
              100.0 * correct / len(test_data),
          )
      )
  
file_path: dynet/examples/mnist/basic-mnist-benchmarks/mnist_dynet_autobatch.py
imports: from __future__ import division
  import os
  import struct
  import argparse
  import random
  import time
  import numpy
  import dynet
label_desc: Use image node_id 3 for calling a global function with example usage: test() without return types