def _display_options(self, instance: AdvancedTextInput, behavior: str,
                         option: list) -> bool:
        """Private function to display options under self.commandText.last_row.
        This function is fired when self.commandText.on_next_options or
        self.commandText.on_prev_options is called. Essentially, this function
        will display options based on behavior and calculate start indices of
        displayed options. According to behavior, there are three scenarios:
            [Scenario 1]: When behavior == "init", the function will display the
                first n (n = max(self.options_per_line, [the number of remaining
                options])) options;
            [Scenario 2]: When behavior == "next", the function will display the
                next n options;
            [Scenario 3]: When behavior == "prev", the function will display the
                previous n options.

        [ensures]:  [display n options below self.commandText.last_row]
                    self.tab_index = -1
                    [convention #3.1]
        """
        # display options based on behavior
        instance.do_cursor_movement("cursor_end", control=True)
        cursor = instance.cursor
        if behavior == "init":
            self.page_index = 0
        else:
            self._clear_options(instance)
            instance.completion_mode = False
            self.tab_index = -1
            next_index = self.page_index + self.options_per_line\
                if behavior == "next"\
                else self.page_index - self.options_per_line
            self.page_index = max(0, next_index)\
                if next_index < len(option)\
                else self.page_index
        end_index = self.page_index + self.options_per_line\
            if self.page_index + self.options_per_line <= len(option)\
            else len(option)
        instance.insert_text("\n" +
                             " ".join(option[self.page_index:end_index]))
        instance.completion_mode = True
        instance.cursor = cursor
        instance._reset_last_line()
        instance.on_cursor(instance, instance.cursor)
        # calc start indices of displayed options
        index = 0
        self.start_indices.clear()
        for s in option[self.page_index:end_index]:
            self.start_indices.append(index)
            index += len(s) + 1
        return True
    def _on_reduce_option(self, instance: AdvancedTextInput) -> bool:
        """Private function to reduce options based on user input. This function
        is fired when self.commandText.on_reduce_option is called.

        [requires]: instance.completion_mode
        [ensures]:  self.option = [opt for all opt in $self.option if
                    opt.lower().startswith(
                        instance.text[self.completion_start:end].lower()
                    )]
        [calls]:    self._stop_completion
        """
        if not asserts(instance.completion_mode, "Not in completion mode"):
            return True

        copy = list()
        instance.do_cursor_movement("cursor_end", control=False)
        end = instance.cursor_index(instance.cursor)
        word_truc = instance.text[self.completion_start:end]
        copy = [
            opt for opt in self.option
            if opt.lower().startswith(word_truc.lower())
        ]
        self._stop_completion(instance)
        self.option = copy