code: def main() -> None:
      parser = argparse.ArgumentParser(
          description="Generates .proto file variations from .in.proto"
      )
      parser.add_argument(
          "-p",
          "--package",
          default="onnx",
          help="package name in the generated proto files"
          " (default: %(default)s)",
      )
      parser.add_argument(
          "-m", "--ml", action="store_true", help="ML mode"
      )
      parser.add_argument(
          "-l",
          "--lite",
          action="store_true",
          help="generate lite proto to use with protobuf-lite",
      )
      parser.add_argument(
          "-o",
          "--output",
          default=os.path.realpath(os.path.dirname(__file__)),
          help="output directory (default: %(default)s)",
      )
      parser.add_argument(
          "--protoc_path",
          default="",
          help="path to protoc for proto3 file validation",
      )
      parser.add_argument(
          "stems",
          nargs="*",
          default=["onnx", "onnx-operators", "onnx-data"],
          help="list of .in.proto file stems " "(default: %(default)s)",
      )
      args = parser.parse_args()
  
      if not os.path.exists(args.output):
          os.makedirs(args.output)
  
      for stem in args.stems:
          convert(
              stem,
              package_name=args.package,
              output=args.output,
              do_onnx_ml=args.ml,
              lite=args.lite,
              protoc_path=args.protoc_path,
          )
  
file_path: catboost/contrib/libs/onnx/onnx/gen_proto.py
imports: import argparse
  import glob
  import os
  import re
  import subprocess
  from textwrap import dedent
  from typing import Iterable, Optional
label_desc: Use image node_id 8 for calling a global function with example usage: main() without return types