def is_docstring_closed(self, view, position):
        indentation_level = view.indentation_level(position)

        # Check the current line first, and ignore if docstring is closed on this line
        line = view.substr(view.line(position))
        match = re.search(r'^\s*""".*"""\s*$', line)

        if match is not None:
            return False

        for current_line in read_next_line(view, position):
            # Not an empty line
            current_line_string = view.substr(current_line).rstrip()
            if len(current_line_string) is 0:
                continue

            # Not on a more indented line
            current_indentation = view.indentation_level(current_line.end())
            if current_indentation > indentation_level:
                continue

            # Still within the same indentation level
            if current_indentation < indentation_level:
                break

            # Line only contains whitespace and """
            if re.search(r'^\s*"""', current_line_string) is not None:
                return True

        return False
Checks if the current docstring is supposed to be closed.
dataset/ETHPy150Open adambullmer/sublime_docblockr_python/parsers/parser.py/PythonParser.is_docstring_closed