code: def _export_from_nnp(args, nnp, output):
      if args.export_format == "NNP":
          parameter_type = "protobuf"
          if args.nnp_parameter_nntxt:
              parameter_type = "included"
          elif args.nnp_parameter_h5:
              parameter_type = "h5"
          if args.nnp_exclude_parameter:
              parameter_type = "none"
          nnp = func_set_nnabla_version_decorate(nnp, args.nnp_version)
          NnpExporter(nnp, args.batch_size, parameter_type).execute(
              output
          )
          logger.info(f"Converting: {output} successfully!")
  
      elif args.export_format == "NNB":
          if args.batch_size < 0:
              print("NNB: Using batch size from input file.")
              print(
                  "NNB: If you want to use with other size use `-b` option and provide a positive value."
              )
              args.batch_size = nnp.protobuf.network[0].batch_size
          if args.define_version and args.define_version.startswith(
              "nnb_"
          ):
              nnb_version = int(args.define_version.split("_")[1])
              NnbExporter(
                  nnp,
                  args.batch_size,
                  nnb_version=nnb_version,
                  api_level=args.api,
              ).execute(
                  output,
                  None,
                  args.settings,
                  args.default_variable_type,
              )
          else:
              NnbExporter(
                  nnp, args.batch_size, api_level=args.api
              ).execute(
                  output,
                  None,
                  args.settings,
                  args.default_variable_type,
              )
  
      elif args.export_format == "CSRC":
          if args.batch_size < 0:
              print("CSRC: Using batch size from input file.")
              print(
                  "CSRC: If you want to use with other size use `-b` option and provide a positive value."
              )
              args.batch_size = nnp.protobuf.network[0].batch_size
          CsrcExporter(nnp, args.batch_size).execute(output)
  
      elif args.export_format == "ONNX":
          from .onnx import OnnxExporter
  
          if args.batch_size < 0:
              print("ONNX: Using batch size from input file.")
              print(
                  "ONNX: If you want to use with other size use `-b` option and provide a positive value."
              )
              args.batch_size = nnp.protobuf.network[0].batch_size
          if args.define_version and args.define_version.startswith(
              "opset_"
          ):
              opset = args.define_version.split("_")[1]
              OnnxExporter(
                  nnp, args.batch_size, args.ir_version, opset=opset
              ).execute(output)
          else:
              OnnxExporter(
                  nnp, args.batch_size, args.ir_version
              ).execute(output)
      elif (
          args.export_format == "SAVED_MODEL"
          or args.export_format == "TF_PB"
      ):
          from .tensorflow import TensorflowExporter
  
          if args.batch_size < 0:
              print(
                  f"{args.export_format}: Using batch size from input file."
              )
              print(
                  f"{args.export_format}: If you want to use with other size use `-b` option and provide a positive value."
              )
              args.batch_size = nnp.protobuf.network[0].batch_size
          TensorflowExporter(
              nnp,
              args.batch_size,
              args.ir_version,
              model_format=args.export_format,
          ).execute(output)
      elif args.export_format == "TFLITE":
          if args.batch_size < 0:
              print("TFLITE: Using batch size from input file.")
              print(
                  "TFLITE: If you want to use with other size use `-b` option and provide a positive value."
              )
              args.batch_size = nnp.protobuf.network[0].batch_size
          from .tflite import TFLiteExporter
  
          TFLiteExporter(
              nnp,
              args.batch_size,
              channel_last=args.channel_last,
              quantization=args.quantization,
              dataset=args.dataset,
          ).execute(output)
      else:
          print(
              "Output file ({})".format(args.export_format)
              + " is not supported or output directory does not exist."
          )
          return False
      return True
  
file_path: nnabla/python/src/nnabla/utils/converter/commands.py
imports: import collections
  import os
  import sys
  from .nnabla import NnpImporter, NnpExporter
  from .nnablart import NnbExporter, CsrcExporter
  from .utils import func_set_import_nnp, func_set_import_onnx_config, func_set_import_config, func_set_nnabla_support, func_set_onnx_support, func_set_nnabla_version_decorate
  from nnabla.logger import logger
label_desc: Use image node_id 3 for calling a global function with example usage: _export_from_nnp(args, nnp, output) and returns: True, False