def METHOD_NAME(self, document, complete_event):
    """Get completions for the current scope.
    :param document: An instance of `prompt_toolkit.Document`.
    :param complete_event: (Unused).
    :return: Yields an instance of `prompt_toolkit.completion.Completion`.
    """
    word_before_cursor = document.get_word_before_cursor(WORD=True)
    text = document.text_before_cursor.lstrip()
    words = document.text.strip().split()
    meta = None
    commands = []
    if not words:
        # yield commands
        pass
    if self.completing_command(words, word_before_cursor):
        commands = self._command_names
        c_meta = {
            k: v.help_text if not isinstance(v, str) else v
            for k, v in self._commands.items()
        }
        meta = lambda x: (  # pylint: disable=unnecessary-lambda-assignment
            x,
            c_meta.get(x, ""),
        )
    else:
        if not list(
            filter(lambda cmd: any(x == cmd for x in words), self._command_names)
        ):
            # yield commands
            pass
        if " " in text:
            command = self.arg_completions(words, word_before_cursor)
            commands = list(command.get_completion())
            commands = list(
                filter(lambda cmd: not (any(cmd in x for x in words)), commands)
            )
            meta = command.get_meta
    for command in commands:
        if self._get_completions(command, word_before_cursor):
            _, display_meta = meta(command) if meta else ("", "")
            yield Completion(
                command, -len(word_before_cursor), display_meta=display_meta
            )