class_docstr: Lexer class that can dynamically returns any Lexer.
  
  :param get_lexer: Callable that returns a :class:`.Lexer` instance.
class_docstr_tok: ["Lexer","class","that","can","dynamically","returns","any","Lexer",".",":","param","get_lexer",":","Callable","that","returns","a",":","class",":","`",".Lexer","`","instance","."]
code: def lex_document(
      self, document: Document
  ) -> Callable[[int], StyleAndTextTuples]:
      lexer = self.get_lexer() or self._dummy
      return lexer.lex_document(document)
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/lexers/base.py
imports: from __future__ import annotations
  from abc import ABCMeta, abstractmethod
  from typing import Callable, Hashable
  from prompt_toolkit.document import Document
  from prompt_toolkit.formatted_text.base import StyleAndTextTuples
label_desc: Use image node_id 2 for calling the DynamicLexer obj's underlying member method code with example usage: obj.lex_document(document) and returns: lexer