code: def main():
      args = parser.parse_args()
  
      args.err_h = os.path.join(
          args.srcdir, "include", "openssl", "err.h"
      )
      if not os.path.isfile(args.err_h):
          # Fall back to infile for OpenSSL 3.0.0
          args.err_h += ".in"
      args.errcodes = os.path.join(
          args.srcdir, "crypto", "err", "openssl.ec"
      )
      args.errtxt = os.path.join(
          args.srcdir, "crypto", "err", "openssl.txt"
      )
  
      if not os.path.isfile(args.errtxt):
          parser.error(f"File {args.errtxt} not found in srcdir\n.")
  
      # {X509: 11, ...}
      args.lib2errnum = parse_err_h(args)
  
      # [('X509_R_AKID_MISMATCH', 'X509', 'AKID_MISMATCH', 110), ...]
      reasons = []
      reasons.extend(parse_openssl_error_text(args))
      reasons.extend(parse_extra_reasons(args))
      # sort by libname, numeric error code
      args.reasons = sorted(reasons, key=operator.itemgetter(0, 3))
  
      lines = [
          "/* File generated by Tools/ssl/make_ssl_data.py */"
          f"/* Generated on {datetime.datetime.utcnow().isoformat()} */"
      ]
      lines.extend(gen_library_codes(args))
      lines.append("")
      lines.extend(gen_error_codes(args))
  
      if args.output is None:
          for line in lines:
              print(line)
      else:
          with open(args.output, "w") as output:
              for line in lines:
                  print(line, file=output)
  
file_path: cpython/Tools/ssl/make_ssl_data.py
imports: import argparse
  import datetime
  import operator
  import os
  import re
  import sys
label_desc: Use image node_id 7 for calling a global function with example usage: main() without return types