code: def main():
      args = parser.parse_args()
      if "dpn" not in args.model:
          raise Exception("Error: Can only convert DPN models.")
      if not has_mxnet:
          raise Exception(
              "Error: Cannot import MXNet module. Please install."
          )
  
      model = create_model(
          args.model, num_classes=1000, pretrained=False
      )
  
      model_prefix = args.model
      if model_prefix in ["dpn107", "dpn68b", "dpn92"]:
          model_prefix += "-extra"
      checkpoint_base = os.path.join(args.checkpoint_path, model_prefix)
      convert_from_mxnet(model, checkpoint_base)
  
      output_checkpoint = os.path.join(
          args.checkpoint_path, model_prefix + ".pth"
      )
      torch.save(model.state_dict(), output_checkpoint)
  
imports: import os
  import argparse
  import torch
  from .model_factory import create_model
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types