code: def _main():
      parser = argparse.ArgumentParser()
  
      parser.add_argument(
          "-n",
          "--network",
          type=_text_type,
          help="Model Type",
          required=True,
          choices=MODEL_URL.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="CNTK Checkpoint file name",
      )
  
      args = parser.parse_args()
  
      fn = download_file(
          MODEL_URL[args.network], directory=args.output_dir
      )
      if not fn:
          return -1
  
      model = C.Function.load(fn)
  
      if len(model.outputs) > 1:
          for idx, output in enumerate(model.outputs):
              if len(output.shape) > 0:
                  eval_node = idx
                  break
  
          model = C.as_composite(model[eval_node].owner)
          model.save(fn)
  
          print("Model {} is saved as {}.".format(args.network, fn))
  
      if args.image:
          import numpy as np
          from mmdnn.conversion.examples.imagenet_test import TestKit
  
          func = TestKit.preprocess_func["cntk"][args.network]
          img = func(args.image)
          img = np.transpose(img, (2, 0, 1))
          predict = model.eval({model.arguments[0]: [img]})
          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
  import cntk
  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