code: def run_imageiter(path_rec, n, batch_size=32):
      data = mx.img.ImageIter(
          batch_size=batch_size,
          data_shape=(3, 224, 224),
          path_imgrec=path_rec,
          rand_crop=True,
          rand_resize=True,
          rand_mirror=True,
      )
      data.reset()
      tic = time.time()
      for i in range(n):
          data.next()
      mx.nd.waitall()
      print(batch_size * n / (time.time() - tic))
  
imports: from __future__ import print_function
  import os
  import time
  import mxnet
label_desc: Use image node_id 1 for calling a global function with example usage: run_imageiter(path_rec, n, batch_size) without return types