docs: def _get_format(self, token):
          """ Returns a QTextCharFormat for token or None.
          """
          if token == Whitespace:
              return self.editor.whitespaces_foreground
  
          if token in self._formats:
              return self._formats[token]
  
          result = self._get_format_from_style(token, self._style)
  
          self._formats[token] = result
          return result