def _get_format(self, token):
        if token in self._formats:
            return self._formats[token]

        if self._style is None:
            result = self._get_format_from_document(token, self._document)
        else:
            result = self._get_format_from_style(token, self._style)

        self._formats[token] = result
        return result
Returns a QTextCharFormat for token or None.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/frontend/qt/console/pygments_highlighter.py/PygmentsHighlighter._get_format