def non_unique(values):
    """Return a set of non-unique values for iterable values."""
    dups = set()
    for i, value in enumerate(values):
        if value in values[i + 1:]:
            dups.add(value)
    return dups
