class_docstr: Format tokens with groff escapes to change their color and font style.
  
  .. versionadded:: 2.11
  
  Additional options accepted:
  
  `style`
      The style to use, can be a string or a Style subclass (default:
      ``'default'``).
  
  `monospaced`
      If set to true, monospace font will be used (default: ``true``).
  
  `linenos`
      If set to true, print the line numbers (default: ``false``).
  
  `wrap`
      Wrap lines to the specified number of characters. Disabled if set to 0
      (default: ``0``).
code: def _escape_chars(self, text):
      text = (
          text.replace("\\", "\\[u005C]")
          .replace(".", "\\[char46]")
          .replace("'", "\\[u0027]")
          .replace("`", "\\[u0060]")
          .replace("~", "\\[u007E]")
      )
      copy = text
  
      for char in copy:
          if len(char) != len(char.encode()):
              uni = (
                  char.encode("unicode_escape")
                  .decode()[1:]
                  .replace("x", "u00")
                  .upper()
              )
              text = text.replace(char, "\\[u" + uni[1:] + "]")
  
      return text
  
file_path: catboost/contrib/python/Pygments/py3/pygments/formatters/groff.py
imports: import math
  from pygments.formatter import Formatter
  from pygments.util import get_bool_opt, get_int_opt
label_desc: Use image node_id 6 for calling the GroffFormatter obj's underlying member method code with example usage: obj._escape_chars(text) and returns: text