class_docstr: Base class for completer implementations.
class_docstr_tok: ["Base","class","for","completer","implementations","."]
docstr: This should be a generator that yields :class:`.Completion` instances.
  
  If the generation of completions is something expensive (that takes a
  lot of time), consider wrapping this `Completer` class in a
  `ThreadedCompleter`. In that case, the completer algorithm runs in a
  background thread and completions will be displayed as soon as they
  arrive.
  
  :param document: :class:`~prompt_toolkit.document.Document` instance.
  :param complete_event: :class:`.CompleteEvent` instance.
docstr_tok: ["This","should","be","a","generator","that","yields",":","class",":","`",".Completion","`","instances",".","If","the","generation","of","completions","is","something","expensive","(","that","takes","a","lot","of","time",")",",","consider","wrapping","this","`","Completer","`","class","in","a","`","ThreadedCompleter","`",".","In","that","case",",","the","completer","algorithm","runs","in","a","background","thread","and","completions","will","be","displayed","as","soon","as","they","arrive",".",":","param","document",":",":","class",":","`","~prompt_toolkit.document.Document","`","instance",".",":","param","complete_event",":",":","class",":","`",".CompleteEvent","`","instance","."]
code: def get_completions(
      self, document: Document, complete_event: CompleteEvent
  ) -> Iterable[Completion]:
      """
      This should be a generator that yields :class:`.Completion` instances.
  
      If the generation of completions is something expensive (that takes a
      lot of time), consider wrapping this `Completer` class in a
      `ThreadedCompleter`. In that case, the completer algorithm runs in a
      background thread and completions will be displayed as soon as they
      arrive.
  
      :param document: :class:`~prompt_toolkit.document.Document` instance.
      :param complete_event: :class:`.CompleteEvent` instance.
      """
      while False:
          yield
  
imports: from __future__ import annotations
  from abc import ABCMeta, abstractmethod
  from typing import AsyncGenerator, Callable, Iterable, Sequence
  from prompt_toolkit.document import Document
  from prompt_toolkit.eventloop import aclosing, generator_to_async_generator
  from prompt_toolkit.filters import FilterOrBool, to_filter
  from prompt_toolkit.formatted_text import AnyFormattedText, StyleAndTextTuples
label_desc: Use image node_id 1 for calling the Completer obj's underlying member method code with example usage: obj.get_completions(document, complete_event) without return types