def reverse_with_set_values(d):
    """
    Reverse the dict, with the values of the new dict being sets.
    
    Example:
    
        reverse_with_set_values({1: 2, 3: 4, 'meow': 2}) =             {2: set([1, 'meow']), 4: set([3])}
            
    """
    new_dict = {}
    for key, value in d.items():
        if value not in new_dict:
            new_dict[value] = []
        new_dict[value].append(key)
    for key, value in new_dict.copy().items():
        new_dict[key] = set(value)
    return new_dict
