def __determine_mark_position(self, buffer_index):
        # Special case the index representing everything has been read from the buffer to map to the
        # current position end.
        if buffer_index == self.__buffer_contents_index[-1].buffer_index_end:
            return self.__buffer_contents_index[-1].position_end

        for entry in self.__buffer_contents_index:
            if entry.buffer_index_start <= buffer_index < entry.buffer_index_end:
                return entry.position_start + buffer_index - entry.buffer_index_start

        # We should never reach here since the fill_buffer method should construct a buffer_contents_index that
        # spans all the buffer positions.
        assert False, 'Buffer index of %d not found' % buffer_index
Returns the recaptcha input HTML.
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/log_processing.py/LogFileIterator.__determine_mark_position--crossover with--dataset/ETHPy150Open mitsuhiko/fungiform/fungiform/recaptcha.py/get_recaptcha_html