code: def convert(
      model: str,
      output: str,
      input_nodes: str,
      output_nodes: str,
      input_shape: str,
  ):
      """Convert TF checkpoint to ONNX use `tf2onnx <https://github.com/onnx/tensorflow-onnx>`_ package.
  
      Args:
          model (str): meta file path
          output (str): output onnx filename
          input_nodes (str): model input names
          output_nodes (str): model output names
          [input_shape (str): model input shape, needed if input dimension is not specified in model graph]
      """
      if input_shape is not None:
          # match input_shape with input_node and recreate the input_nodes string
          shapes = []
          input_shapes = FLAGS.input_shape.split(";")
          input_nodes = input_nodes.split(",")
          new_input_nodes = []
          for input_node, input_shape in zip(input_nodes, input_shapes):
              new_input_node = input_node + "[" + input_shape + "]"
              new_input_nodes.append(new_input_node)
          input_nodes = ",".join(new_input_nodes)
  
      argv = {
          "checkpoint": model,
          "output": output,
          "inputs": input_nodes,
          "outputs": output_nodes,
      }
      convert_onnx(**argv)
  
imports: from os import path
  from absl import flags, app
  from .utils import reset_flag
  from .to_onnx import convert_onnx
label_desc: Use image node_id 1 for calling a global function with example usage: convert(model, output, input_nodes, output_nodes, input_shape) without return types