code: def benchmark(
      network,
      ctx,
      batch_size=64,
      image_size=224,
      num_iter=100,
      datatype="float32",
  ):
      input_shape = (batch_size, 3) + (image_size, image_size)
      data = mx.random.uniform(
          -1.0, 1.0, shape=input_shape, ctx=ctx, dtype=datatype
      )
      dryrun = 5
      for i in range(num_iter + dryrun):
          if i == dryrun:
              tic = time.time()
          output = network(data)
          output.asnumpy()
      toc = time.time() - tic
      return toc
  
file_path: gluon-cv/scripts/classification/imagenet/verify_pretrained.py
imports: import argparse, os, math, time, sys
  import mxnet
  import logging
  from mxnet import gluon, nd, image
  from mxnet.gluon.nn import Block, HybridBlock
  from mxnet.gluon.data.vision import transforms
  from mxnet.contrib.quantization import *
  import gluoncv
  from gluoncv.data import imagenet
  from gluoncv.model_zoo import get_model
label_desc: Use image node_id 2 for calling a global function with example usage: benchmark(network, ctx, batch_size, image_size, num_iter, datatype) and returns: toc