

def _write_buffering_with_index(self, grpos, flags, data):
    self._s.data.append((grpos, flags, data))
    if (self._grpos_first is None):
        self._grpos_first = self._s.data[0][0]
    self._grpos_last = grpos
    self._update_index(((len(self._s.data) + self._s.data_offset) - 1), grpos, flags)
    self._cut_selected()

dataset/ETHPy150Open arkadini/twimp/twimp/server/inmemory.py IMLiveStream._write_buffering_with_index/original