code: def export_onnx(input_image_path, output_path, gpu, only_output=True):
      """Export YOLOv2 Tiny model to ONNX graph
  
      'model.onnx' file will be exported under ``output_path``.
      """
      model = YOLOv2Tiny(pretrained_model="voc0712")
  
      input_image = read_image(input_image_path)
      input_image = input_image[None, :]
  
      if gpu >= 0:
          model.to_gpu()
          input_image = chainer.cuda.to_gpu(input_image)
  
      if only_output:
          os.makedirs(output_path, exist_ok=True)
          name = os.path.join(output_path, "model.onnx")
          export(
              model,
              input_image,
              filename=name,
              output_names=("locs", "objs", "confs"),
          )
      else:
          # an input and output given by Chainer will be also emitted
          # for using as test dataset
          export_testcase(
              model,
              input_image,
              output_path,
              output_names=("locs", "objs", "confs"),
          )
  
file_path: chainer/onnx_chainer/examples/yolov2tiny/export.py
imports: import argparse
  import os
  import chainer.cuda
  from chainercv.experimental.links import YOLOv2Tiny
  from chainercv.utils import read_image
  from onnx_chainer import export
  from onnx_chainer import export_testcase
label_desc: Use image node_id 1 for calling a global function with example usage: export_onnx(input_image_path, output_path, gpu, only_output) without return types