code: def main():
      parser = ArgumentParser("Hugging Face Transformers ONNX exporter")
      parser.add_argument(
          "-m",
          "--model",
          type=str,
          required=True,
          help="Model ID on huggingface.co or path on disk to load model from.",
      )
      parser.add_argument(
          "--feature",
          default="default",
          help="The type of features to export the model with.",
      )
      parser.add_argument(
          "--opset",
          type=int,
          default=None,
          help="ONNX opset version to export the model with.",
      )
      parser.add_argument(
          "--atol",
          type=float,
          default=None,
          help="Absolute difference tolerance when validating the model.",
      )
      parser.add_argument(
          "--framework",
          type=str,
          choices=["pt", "tf"],
          default=None,
          help=(
              "The framework to use for the ONNX export."
              " If not provided, will attempt to use the local checkpoint's original framework"
              " or what is available in the environment."
          ),
      )
      parser.add_argument(
          "output",
          type=Path,
          help="Path indicating where to store generated ONNX model.",
      )
      parser.add_argument(
          "--cache_dir",
          type=str,
          default=None,
          help="Path indicating where to store cache.",
      )
      parser.add_argument(
          "--preprocessor",
          type=str,
          choices=[
              "auto",
              "tokenizer",
              "feature_extractor",
              "image_processor",
              "processor",
          ],
          default="auto",
          help="Which type of preprocessor to use. 'auto' tries to automatically detect it.",
      )
      parser.add_argument(
          "--export_with_transformers",
          action="store_true",
          help=(
              "Whether to use transformers.onnx instead of optimum.exporters.onnx to perform the ONNX export. It can be "
              "useful when exporting a model supported in transformers but not in optimum, otherwise it is not "
              "recommended."
          ),
      )
  
      args = parser.parse_args()
      if args.export_with_transformers or not is_optimum_available():
          export_with_transformers(args)
      else:
          export_with_optimum(args)
  
file_path: transformers/src/transformers/onnx/__main__.py
imports: import subprocess
  import sys
  import warnings
  from argparse import ArgumentParser
  from pathlib import Path
  from packaging import version
  from ..None import AutoFeatureExtractor, AutoImageProcessor, AutoProcessor, AutoTokenizer
  from ..utils import logging
  from ..utils.import_utils import is_optimum_available
  from .convert import export, validate_model_outputs
  from .features import FeaturesManager
  from .utils import get_preprocessor
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types