code: def _convert(args):
      if args.framework == "caffe":
          raise NotImplementedError(
              "Destination [Caffe] is not implemented yet."
          )
  
      elif args.framework == "keras":
          raise NotImplementedError(
              "Destination [Keras] is not implemented yet."
          )
  
      elif args.framework == "tensorflow":
          raise NotImplementedError(
              "Destination [Tensorflow] is not implemented yet."
          )
  
      elif args.framework == "cntk":
          raise NotImplementedError(
              "Destination [CNTK] is not implemented yet."
          )
  
      elif args.framework == "coreml":
          from mmdnn.conversion.coreml.coreml_emitter import (
              CoreMLEmitter,
          )
  
          assert args.inputNetwork is not None
          assert args.inputWeight is not None
          emitter = CoreMLEmitter(args.inputNetwork, args.inputWeight)
          model, in_, out_ = emitter.gen_model(
              args.inputNames,
              args.outputNames,
              image_input_names=set(args.imageInputNames)
              if args.imageInputNames
              else None,
              is_bgr=args.isBGR,
              red_bias=args.redBias,
              blue_bias=args.blueBias,
              green_bias=args.greenBias,
              gray_bias=args.grayBias,
              image_scale=args.scale,
              class_labels=args.classInputPath
              if args.classInputPath
              else None,
              predicted_feature_name=args.predictedFeatureName,
          )
  
          """
          from google.protobuf import text_format
          with open(args.output+'.txt', 'w') as f:
              f.write(text_format.MessageToString(model))
          """
  
          with open(args.output, "wb") as f:
              model = model.SerializeToString()
              f.write(model)
  
          return 0
  
      elif args.framework == "pytorch":
          if not args.dstWeightPath or not args.IRWeightPath:
              raise ValueError("Need to set a target weight filename.")
          from mmdnn.conversion.pytorch.pytorch_emitter import (
              PytorchEmitter,
          )
  
          emitter = PytorchEmitter(
              (args.IRModelPath, args.IRWeightPath)
          )
  
      elif args.framework == "mxnet":
          from mmdnn.conversion.mxnet.mxnet_emitter import MXNetEmitter
  
          if args.IRWeightPath == None:
              emitter = MXNetEmitter(args.IRModelPath)
          else:
              emitter = MXNetEmitter(
                  (
                      args.IRModelPath,
                      args.IRWeightPath,
                      args.inputShape,
                      args.dstWeightPath,
                  )
              )
  
      else:
          assert False
  
      emitter.run(args.output)
  
      return 0
  
imports: import sys
  import google.protobuf.text_format
  from six import text_type
label_desc: Use image node_id 1 for calling a global function with example usage: _convert(args) and returns: int, int