code: def _main():
      parser = argparse.ArgumentParser()
  
      parser.add_argument(
          "-n",
          "--network",
          type=_text_type,
          help="Model Type",
          required=True,
          choices=DEFAULT_MODEL_INFO.keys(),
      )
  
      parser.add_argument(
          "-i",
          "--image",
          default=None,
          type=_text_type,
          help="Test Image Path",
      )
  
      parser.add_argument(
          "-o",
          "--output_dir",
          default="./",
          type=_text_type,
          help="Caffe Checkpoint file name",
      )
  
      args = parser.parse_args()
  
      arch_fn = download_file(
          DEFAULT_MODEL_INFO[args.network]["prototxt"],
          directory=args.output_dir,
      )
      if not arch_fn:
          return -1
  
      weight_fn = download_file(
          DEFAULT_MODEL_INFO[args.network]["caffemodel"],
          directory=args.output_dir,
      )
      if not weight_fn:
          return -1
  
      print("Model {} saved.".format(args.network))
  
      if args.image:
          import caffe
          import numpy as np
          from mmdnn.conversion.examples.imagenet_test import TestKit
  
          net = caffe.Net(
              arch_fn.encode("utf-8"),
              weight_fn.encode("utf-8"),
              caffe.TEST,
          )
          # net = caffe.Net(arch_fn, weight_fn, caffe.TEST)
          func = TestKit.preprocess_func["caffe"][args.network]
          img = func(args.image)
          img = np.transpose(img, (2, 0, 1))
          img = np.expand_dims(img, 0)
          net.blobs["data"].data[...] = img
          predict = np.squeeze(net.forward()["prob"][0])
          predict = np.squeeze(predict)
          top_indices = predict.argsort()[-5:][::-1]
          result = [(i, predict[i]) for i in top_indices]
          print(result)
          print(np.sum(result))
  
      return 0
  
imports: import argparse
  import os
  from six import text_type
  from mmdnn.conversion.common.utils import download_file
label_desc: Use image node_id 1 for calling a global function with example usage: _main() and returns: int, unknown, unknown