def _bulk_get_revs(target_db, doc_ids):
    result = target_db.all_docs(keys=list(doc_ids)).all()
    return [(row['id'], row['value']['rev']) for row in result if not row.get('error')]
return (_id, _rev) for every existing doc in doc_ids
dataset/ETHPy150Open dimagi/commcare-hq/corehq/doctypemigrations/continuous_migrate.py/_bulk_get_revs