This documentation is for an old version of IPython. You can find docs for newer versions here.
Uses Pygments and some auxillary information to lex code snippets for symbol contexts.
Create a CompletionLexer using the specified Pygments lexer.
Assuming the cursor is at the end of the specified string, get the context (a list of names) for the symbol at cursor position.