code: def highlight(__text: str, *, lexer: str = 'diff',
                formatter: str = 'terminal') -> str:
      
      if sys.stdout.isatty():
          lexer = get_lexer_by_name(lexer)
          formatter = get_formatter_by_name(formatter)
          __text = pyg_highlight(__text, lexer, formatter)
      return __text
docs: Highlight text highlighted using ``pygments``.
  
      Returns text untouched if colour output is not enabled.
  
      See also: :pypi:`Pygments`
  
      Args:
          __text: Text to highlight
          lexer: Jinja lexer to use
          formatter: Jinja formatter to use
      Returns:
          Syntax highlighted output, when possible