def __check_index(self, index):
        if index < self.__start_pos or index >= self.__max_pos:
            raise IndexError(
                "Index out of range for buffer (index %i, limit %i to %i)" %
                (index, self.__start_pos, self.__max_pos))
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/json_lib/parser.py/ByteScanner.__check_index/original