code: def run(args):
      save_dir = "models"
      imgs = np.random.random((100, 40, 40, 3))
      opt = InferenceOptimizer()
      options = list(
          InferenceOptimizer.ALL_INFERENCE_ACCELERATION_METHOD.keys()
      )
      if args.option in options:
          try:
              try:
                  model = ResNet50(
                      weights=None, input_shape=[40, 40, 3], classes=10
                  )
                  model = opt.load(
                      os.path.join(save_dir, args.option), model
                  )
              except Exception:
                  model = opt.load(os.path.join(save_dir, args.option))
              # warmup
              model.predict(imgs[:10], batch_size=1)
  
              st = time.time()
              model.predict(imgs, batch_size=1)
              end = time.time()
              throughput = len(imgs) / (end - st)
          except Exception:
              throughput = 0
          print(f"Throughput: {throughput}")
      else:
          print(f"unkonwn option: {args.option}")
          sys.exit(-1)
  
imports: import time
  import os
  import sys
  import argparse
  import numpy
  from tensorflow.keras.applications import ResNet50
  from bigdl.nano.tf.keras import InferenceOptimizer
label_desc: Use image node_id 1 for calling a global function with example usage: run(args) without return types