class_docstr: A directive to collect all lexers/formatters/filters and generate
  autoclass directives for them.
class_docstr_tok: ["A","directive","to","collect","all","lexers\/formatters\/filters","and","generate","autoclass","directives","for","them","."]
docstr: Generate a tabular overview of all lexers.
  
  The columns are the lexer name, the extensions handled by this lexer
  (or "None"), the aliases and a link to the lexer class.
docstr_tok: ["Generate","a","tabular","overview","of","all","lexers",".","The","columns","are","the","lexer","name",",","the","extensions","handled","by","this","lexer","(","or","``","None","''",")",",","the","aliases","and","a","link","to","the","lexer","class","."]
code: def document_lexers_overview(self):
      """Generate a tabular overview of all lexers.
  
      The columns are the lexer name, the extensions handled by this lexer
      (or "None"), the aliases and a link to the lexer class."""
      from pygments.lexers._mapping import LEXERS
      import pygments.lexers
  
      out = []
  
      table = []
  
      def format_link(name, url):
          if url:
              return f"`{name} <{url}>`_"
          return name
  
      for classname, data in sorted(
          LEXERS.items(), key=lambda x: x[1][1].lower()
      ):
          lexer_cls = pygments.lexers.find_lexer_class(data[1])
          extensions = lexer_cls.filenames + lexer_cls.alias_filenames
  
          table.append(
              {
                  "name": format_link(data[1], lexer_cls.url),
                  "extensions": ", ".join(extensions)
                  .replace("*", "\\*")
                  .replace("_", "\\")
                  or "None",
                  "aliases": ", ".join(data[2]),
                  "class": f"{data[0]}.{classname}",
              }
          )
  
      column_names = ["name", "extensions", "aliases", "class"]
      column_lengths = [
          max([len(row[column]) for row in table if row[column]])
          for column in column_names
      ]
  
      def write_row(*columns):
          """Format a table row"""
          out = []
          for l, c in zip(column_lengths, columns):
              if c:
                  out.append(c.ljust(l))
              else:
                  out.append(" " * l)
  
          return " ".join(out)
  
      def write_seperator():
          """Write a table separator row"""
          sep = ["=" * c for c in column_lengths]
          return write_row(*sep)
  
      out.append(write_seperator())
      out.append(
          write_row(
              "Name", "Extension(s)", "Short name(s)", "Lexer class"
          )
      )
      out.append(write_seperator())
      for row in table:
          out.append(
              write_row(
                  row["name"],
                  row["extensions"],
                  row["aliases"],
                  f':class:`~{row["class"]}`',
              )
          )
      out.append(write_seperator())
  
      return "\n".join(out)
  
file_path: catboost/contrib/python/Pygments/py3/pygments/sphinxext.py
imports: import sys
  from docutils import nodes
  from docutils.statemachine import ViewList
  from docutils.parsers.rst import Directive
  from sphinx.util.nodes import nested_parse_with_titles
label_desc: Use image node_id 2 for calling the PygmentsDoc obj's underlying member method code with example usage: obj.document_lexers_overview() and returns: str, name, str, write_row, str, name, str, url, str