code: def main() -> None:
      parser = argparse.ArgumentParser(
          description="Generate ONNX diagnostics files"
      )
      parser.add_argument(
          "rules_path", metavar="RULES", help="path to rules.yaml"
      )
      parser.add_argument(
          "out_py_dir",
          metavar="OUT_PY",
          help="path to output directory for Python",
      )
      parser.add_argument(
          "out_cpp_dir",
          metavar="OUT_CPP",
          help="path to output directory for C++",
      )
      parser.add_argument(
          "out_docs_dir",
          metavar="OUT_DOCS",
          help="path to output directory for docs",
      )
      args = parser.parse_args()
      gen_diagnostics(
          args.rules_path,
          args.out_py_dir,
          args.out_cpp_dir,
          args.out_docs_dir,
      )
  
file_path: pytorch/tools/onnx/gen_diagnostics.py
imports: import argparse
  import os
  import string
  import subprocess
  import textwrap
  from typing import Any, Mapping, Sequence
  import yaml
  from torchgen import utils
  from torchgen.yaml_utils import YamlLoader
label_desc: Use image node_id 11 for calling a global function with example usage: main() without return types