code: def generate_completions(event: E) -> None:
      r"""
      Tab-completion: where the first tab completes the common suffix and the
      second tab lists all the completions.
      """
      b = event.current_buffer
  
      # When already navigating through completions, select the next one.
      if b.complete_state:
          b.complete_next()
      else:
          b.start_completion(insert_common_part=True)
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/bindings/completion.py
imports: from __future__ import annotations
  import asyncio
  import math
  from typing import TYPE_CHECKING
  from prompt_toolkit.application.run_in_terminal import in_terminal
  from prompt_toolkit.completion import CompleteEvent, Completion, get_common_complete_suffix
  from prompt_toolkit.formatted_text import StyleAndTextTuples
  from prompt_toolkit.key_binding.key_bindings import KeyBindings
  from prompt_toolkit.key_binding.key_processor import KeyPressEvent
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.utils import get_cwidth
label_desc: Use image node_id 1 for calling a global function with example usage: generate_completions(event) without return types