class_docstr: Completer which can be used for autocompletion according to variables in
  the grammar. Each variable can have a different autocompleter.
  
  :param compiled_grammar: `GrammarCompleter` instance.
  :param completers: `dict` mapping variable names of the grammar to the
                     `Completer` instances to be used for each variable.
class_docstr_tok: ["Completer","which","can","be","used","for","autocompletion","according","to","variables","in","the","grammar",".","Each","variable","can","have","a","different","autocompleter",".",":","param","compiled_grammar",":","`","GrammarCompleter","`","instance",".",":","param","completers",":","`","dict","`","mapping","variable","names","of","the","grammar","to","the","`","Completer","`","instances","to","be","used","for","each","variable","."]
code: def __init__(
      self,
      compiled_grammar: _CompiledGrammar,
      completers: dict[str, Completer],
  ) -> None:
      self.compiled_grammar = compiled_grammar
      self.completers = completers
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/contrib/regular_languages/completion.py
imports: from __future__ import annotations
  from typing import Iterable
  from prompt_toolkit.completion import CompleteEvent, Completer, Completion
  from prompt_toolkit.document import Document
  from .compiler import Match, _CompiledGrammar
label_desc: Use image node_id 1 to create a new GrammarCompleter object from inherited base classes: Completer with example: obj = GrammarCompleter(compiled_grammar, completers)