def make_oracle_from_labels(class_labels):
    """Given a list of class labels, generates an oracle that will answer
    posed queries queries based on the labels.

    Parameters
    ----------
    class_labels : array_like
        A list of class labels, which the oracle will use to answer queries.

    Returns
    -------
    function
        An oracle function.

    """
    return lambda a, b: class_labels[a] == class_labels[b]