code: def export_onnx(input_image_path, output_path, gpu, only_output=True):
      """Export ResNet50 model to ONNX graph
  
      'model.onnx' file will be exported under ``output_path``.
      """
      model = C.ResNet50(pretrained_model="imagenet", arch="fb")
  
      input_image = read_image(input_image_path)
      input_image = scale(input_image, 256)
      input_image = center_crop(input_image, (224, 224))
      input_image -= model.mean
      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)
      else:
          # an input and output given by Chainer will be also emitted
          # for using as test dataset
          export_testcase(model, input_image, output_path)
  
file_path: chainer/onnx_chainer/examples/resnet50/export.py
imports: import argparse
  import os
  import chainer.cuda
  import chainercv.links
  from chainercv.transforms import center_crop
  from chainercv.transforms import scale
  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