def get_sync_start_position(self, document, lineno):
        " Scan backwards, and find a possible position to start. "
        pattern = self._compiled_pattern
        lines = document.lines

        # Scan upwards, until we find a point where we can start the syntax
        # synchronisation.
        for i in range(lineno, max(-1, lineno - self.MAX_BACKWARDS), -1):
            match = pattern.match(lines[i])
            if match:
                return i, match.start()

        # No synchronisation point found. If we aren't that far from the
        # beginning, start at the very beginning, otherwise, just try to start
        # at the current line.
        if self.FROM_START_IF_NO_SYNC_POS_FOUND < lineno:
            return 0, 0
        else:
            return lineno, 0
dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/prompt_toolkit/layout/lexers.py/RegexSync.get_sync_start_position/swapped operands of `<`