class_docstr: For Python console output or doctests, such as:
  
  .. sourcecode:: pycon
  
      >>> a = 'foo'
      >>> print a
      foo
      >>> 1 / 0
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      ZeroDivisionError: integer division or modulo by zero
  
  Additional options:
  
  `python3`
      Use Python 3 lexer for code.  Default is ``True``.
  
      .. versionadded:: 1.0
      .. versionchanged:: 2.5
         Now defaults to ``True``.
code: def get_tokens_unprocessed(self, text):
      if self.python3:
          pylexer = PythonLexer(**self.options)
          tblexer = PythonTracebackLexer(**self.options)
      else:
          pylexer = Python2Lexer(**self.options)
          tblexer = Python2TracebackLexer(**self.options)
  
      curcode = ""
      insertions = []
      curtb = ""
      tbindex = 0
      tb = 0
      for match in line_re.finditer(text):
          line = match.group()
          if line.startswith(">>> ") or line.startswith("... "):
              tb = 0
              insertions.append(
                  (len(curcode), [(0, Generic.Prompt, line[:4])])
              )
              curcode += line[4:]
          elif line.rstrip() == "..." and not tb:
              # only a new >>> prompt can end an exception block
              # otherwise an ellipsis in place of the traceback frames
              # will be mishandled
              insertions.append(
                  (len(curcode), [(0, Generic.Prompt, "...")])
              )
              curcode += line[3:]
          else:
              if curcode:
                  for item in do_insertions(
                      insertions,
                      pylexer.get_tokens_unprocessed(curcode),
                  ):
                      yield item
                  curcode = ""
                  insertions = []
              if line.startswith(
                  "Traceback (most recent call last):"
              ) or re.match('  File "[^"]+", line \\d+\\n$', line):
                  tb = 1
                  curtb = line
                  tbindex = match.start()
              elif line == "KeyboardInterrupt\n":
                  yield match.start(), Name.Class, line
              elif tb:
                  curtb += line
                  if not (
                      line.startswith(" ") or line.strip() == "..."
                  ):
                      tb = 0
                      for i, t, v in tblexer.get_tokens_unprocessed(
                          curtb
                      ):
                          yield tbindex + i, t, v
                      curtb = ""
              else:
                  yield match.start(), Generic.Output, line
      if curcode:
          for item in do_insertions(
              insertions, pylexer.get_tokens_unprocessed(curcode)
          ):
              yield item
      if curtb:
          for i, t, v in tblexer.get_tokens_unprocessed(curtb):
              yield tbindex + i, t, v
  
imports: import re
  from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, default, words, combined, do_insertions
  from pygments.util import get_bool_opt, shebang_matches
  from pygments.token import Text, Comment, Operator, Keyword, Name, String, Number, Punctuation, Generic, Other, Error
  from pygments import unistring
label_desc: Use image node_id 2 for calling the PythonConsoleLexer obj's underlying member method code with example usage: obj.get_tokens_unprocessed(text) without return types