def METHOD_NAME(stream_obj):
    stream_type = stream_obj.read(4)
    len_sample = np.frombuffer(stream_obj.read(4), dtype=np.int32)[0]
    buf = bytearray(8)
    mv = memoryview(buf)
    event_agg = np.ndarray(1, buffer=mv, dtype=event_agg_dtype)
    sidx_loss = np.ndarray(1, buffer=mv, dtype=sidx_loss_dtype)
    event_id_last = 0
    event_id, agg_id = 0, 0
    dict_array = {}
    while stream_obj.readinto(mv):
        if agg_id:
            sidx, loss = sidx_loss[0]
            if sidx == -3:
                sidx = 0
            elif sidx == -2:
                continue
            elif sidx == 0:
                agg_id = 0
                continue
            cur_array[sidx] = 0 if np.isnan(loss) else loss
        else:
            event_id, agg_id = event_agg[0]
            # if event_id_last != event_id:
            #     if event_id_last:
            #         break
            #     else:
            #         event_id_last = event_id
            cur_array = np.zeros(len_sample + EXTRA_VALUES, dtype=np_oasis_float)
            dict_array[(event_id, agg_id)] = cur_array
    return stream_type, len_sample, dict_array