code: def benchmarking(opt, net, ctx):
      bs = opt.batch_size
      num_iterations = opt.num_iterations
      input_size = opt.input_size
      size = num_iterations * bs
      input_shape = (
          bs * opt.num_segments,
          3,
          opt.new_length,
          input_size,
          input_size,
      )
      data = mx.random.uniform(
          -1.0, 1.0, shape=input_shape, ctx=ctx[0], dtype="float32"
      )
      if opt.new_length == 1:
          # this is for 2D input case
          data = nd.squeeze(data, axis=2)
      dry_run = 5
  
      from tqdm import tqdm
  
      with tqdm(total=size + dry_run * bs) as pbar:
          for n in range(dry_run + num_iterations):
              if n == dry_run:
                  tic = time.time()
              output = net(data)
              output.wait_to_read()
              pbar.update(bs)
      speed = size / (time.time() - tic)
      print(
          "With batch size %d , %d batches, throughput is %f imgs/sec"
          % (bs, num_iterations, speed)
      )
  
imports: import argparse, time, logging, os, sys, math
  import gc
  import numpy
  import mxnet
  import mxnet.ndarray
  import gluoncv
  from mxnet import gluon, nd, gpu, init, context
  from mxnet import autograd
  from mxnet.gluon import nn
  from mxnet.gluon.data.vision import transforms
  from mxnet.contrib.quantization import *
  from gluoncv.data.transforms import video
  from gluoncv.data import UCF101, Kinetics400, Kinetics700, SomethingSomethingV2, HMDB51
  from gluoncv.model_zoo import get_model
  from gluoncv.utils import makedirs, LRSequential, LRScheduler, split_and_load
label_desc: Use image node_id 4 for calling a global function with example usage: benchmarking(opt, net, ctx) without return types