def _get_matching_keys(*query_filters_list, model):
    """Returns all the keys matching any of the `query_filters` given `model`."""
    entity_keys = set()
    for query_filters in query_filters_list:
        query = model.query(*query_filters)
        ekeys = model.all(query=query, keys_only=True, order=False)
        entity_keys |= set(ekeys)
    return entity_keys