def unroll_sqlalchemy_id_tuple(tup):
    ret = []

    if len(tup) == 0:
        return []

    for t in tup:
        ret.append(t[0])

    return ret
If we get a list of IDs from SqlAlchemy, it looks like:
dataset/ETHPy150Open sjuxax/raggregate/raggregate/queries/general.py/unroll_sqlalchemy_id_tuple