

def _get_auth_chain_ids_txn(self, txn, event_ids):
    results = set()
    base_sql = 'SELECT auth_id FROM event_auth WHERE event_id IN (%s)'
    front = set(event_ids)
    while front:
        new_front = set()
        front_list = list(front)
        chunks = [front_list[x:(x + 100)] for x in xrange(0, len(front), 100)]
        for chunk in chunks:
            txn.execute((base_sql % (','.join((['?'] * len(chunk))),)), chunk)
            new_front.update([r[0] for r in txn.fetchall()])
        new_front -= results
        front = new_front
        results.update(front)
    return list(x)

dataset/ETHPy150Open matrix-org/synapse/synapse/storage/event_federation.py EventFederationStore._get_auth_chain_ids_txn/VarMisuse@155/206 `results`->`x`