def find_enclosing_bracket_left(self, left_ch, right_ch, start_pos=None):
        if self.current_char == left_ch:
            return 0

        if start_pos is None:
            start_pos = 0
        else:
            start_pos = max(0, start_pos)

        stack = 1

        # Look backward.
        for i in range(self.cursor_position - 1, start_pos - 1, -1):
            c = self.text[i]

            if c == right_ch:
                stack += 1
            elif c == left_ch:
                stack -= 1

            if stack == 0:
                return i - self.cursor_position
Find the left bracket enclosing current position. Return the relative
dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/prompt_toolkit/document.py/Document.find_enclosing_bracket_left