code: def main(args=sys.argv):
      """
      Main command line entry point.
      """
      usage = USAGE % ((args[0],) * 6)
  
      try:
          popts, args = getopt.getopt(
              args[1:], "l:f:F:o:O:P:LS:a:N:vhVHgsx"
          )
      except getopt.GetoptError:
          print(usage, file=sys.stderr)
          return 2
  
      try:
          return main_inner(popts, args, usage)
      except Exception:
          if "-v" in dict(popts):
              print(file=sys.stderr)
              print("*" * 65, file=sys.stderr)
              print(
                  "An unhandled exception occurred while highlighting.",
                  file=sys.stderr,
              )
              print(
                  "Please report the whole traceback to the issue tracker at",
                  file=sys.stderr,
              )
              print(
                  "<https://bitbucket.org/birkenfeld/pygments-main/issues>.",
                  file=sys.stderr,
              )
              print("*" * 65, file=sys.stderr)
              print(file=sys.stderr)
              raise
          import traceback
  
          info = traceback.format_exception(*sys.exc_info())
          msg = info[-1].strip()
          if len(info) >= 3:
              # extract relevant file and position info
              msg += "\n   (f%s)" % info[-2].split("\n")[0].strip()[1:]
          print(file=sys.stderr)
          print("*** Error while highlighting:", file=sys.stderr)
          print(msg, file=sys.stderr)
          print(
              "*** If this is a bug you want to report, please rerun with -v.",
              file=sys.stderr,
          )
          return 1
  
file_path: wandb/wandb/vendor/pygments/cmdline.py
imports: from __future__ import print_function
  import sys
  import getopt
  from textwrap import dedent
  from pygments import __version__, highlight
  from pygments.util import ClassNotFound, OptionError, docstring_headline, guess_decode, guess_decode_from_terminal, terminal_encoding
  from pygments.lexers import get_all_lexers, get_lexer_by_name, guess_lexer, load_lexer_from_file, get_lexer_for_filename, find_lexer_class_for_filename
  from pygments.lexers.special import TextLexer
  from pygments.formatters.latex import LatexEmbeddedLexer, LatexFormatter
  from pygments.formatters import get_all_formatters, get_formatter_by_name, load_formatter_from_file, get_formatter_for_filename, find_formatter_class
  from pygments.formatters.terminal import TerminalFormatter
  from pygments.filters import get_all_filters, find_filter_class
  from pygments.styles import get_all_styles, get_style_by_name
label_desc: Use image node_id 6 for calling a global function with example usage: main(args) and returns: main_inner, int, int