def _cut_grpos_flagmask(self):
        d = self._s.data
        target_grpos = self._grpos_last % self._buffer_grpos
        i_pos, i_len = 0, len(self._index)
        while i_pos < i_len:
            abs_pos, grpos = self._index[i_pos]
            if grpos > target_grpos:
                break
            i_pos += 1
        if i_pos > 0:
            i_pos -= 1
            offset = self._s.data_offset
            pos, self._index[:i_pos] = self._index[i_pos][0] - offset, []
            self._s.data_offset, d[:pos] = offset + pos, []
            self._grpos_first = d[0][0]
dataset/ETHPy150Open arkadini/twimp/twimp/server/inmemory.py/IMLiveStream._cut_grpos_flagmask/operator `-` -> `%`