code: def benchmark_score(
      symblock,
      ctx,
      batch_size,
      warmup_batches,
      num_batches,
      data_layer_type,
  ):
      if data_layer_type == "int8":
          dshape = mx.io.DataDesc(
              name="data",
              shape=(batch_size,) + data_shape,
              dtype=np.int8,
          )
      elif data_layer_type == "uint8":
          dshape = mx.io.DataDesc(
              name="data",
              shape=(batch_size,) + data_shape,
              dtype=np.uint8,
          )
      else:  # float32
          dshape = mx.io.DataDesc(
              name="data",
              shape=(batch_size,) + data_shape,
              dtype=np.float32,
          )
  
      # get data
      if data_layer_type == "float32":
          data = [
              mx.random.uniform(
                  -1.0, 1.0, shape=shape, ctx=ctx, dtype=data_layer_type
              )
              for _, shape in [dshape]
          ]
      else:
          data = [
              mx.nd.full(
                  shape=shape, val=127, ctx=ctx, dtype=data_layer_type
              )
              for _, shape in [dshape]
          ]
  
      # run
      for i in range(warmup_batches + num_batches):
          if i == warmup_batches:
              tic = time.time()
          outputs = symblock.forward(*data)
          for output in outputs:
              output.wait_to_read()
  
      # return num images per second
      return num_batches * batch_size / (time.time() - tic)
  
file_path: mxnet/example/quantization/imagenet_inference.py
imports: import argparse
  import logging
  import time
  import mxnet
  import numpy
  from mxnet import gluon
  from mxnet.gluon.data import DataLoader
  from mxnet.gluon.data.vision import transforms
label_desc: Use image node_id 4 for calling a global function with example usage: benchmark_score(symblock, ctx, batch_size, warmup_batches, num_batches, data_layer_type) and returns: unknown