def _init_index(self):
        index = []
        if self._s.data:
            offset = self._s.data_offset
            for i, (grpos, flags, data) in enumerate(self._s.data):
                if self._buffer_flagmask & flags:
                    index.append((i + offset, grpos))
        self._index = index
dataset/ETHPy150Open arkadini/twimp/twimp/server/inmemory.py/IMLiveStream._init_index/original