

def trim(self, grpos_range, frames=None, flag_mask=0):
    raw_pos = self._scan_from_end(grpos_range, frames=frames, flag_mask=flag_mask)
    if (flag_mask is not None):
        pos = (raw_pos - self._s.data_offset)
        if (pos > 0):
            self._s.data_offset += pos
            self._s.data[:pos] = []
    return defer.succeed(None)

dataset/ETHPy150Open arkadini/twimp/twimp/server/inmemory.py IMStream.trim/VarMisuse@39/57 `raw_pos`->`flag_mask`