def _allowed_labels_by_conjunction(conjunction, indices):
    """
    Returns all partition labels which are allowed by the given conjunction (AND)
    of literals based on the indices

    Parameters
    ----------
    conjunction: list of tuple
        A list of (column, operator, value) tuples
    indices: dict
        A dict column->kartothek.core.index.IndexBase holding the indices to be evaluated
    Returns
    -------
    set: allowed labels
    """
    allowed_by_conjunction = None
    for col, op, val in conjunction:
        allowed_labels = indices[col].eval_operator(op, val)
        if allowed_by_conjunction is not None:
            allowed_by_conjunction &= allowed_labels
        else:
            allowed_by_conjunction = allowed_labels
    return allowed_by_conjunction