import collections


def get_duplicates(iterable):
    """Return a set of the elements which appear multiple times in iterable."""
    counter = collections.Counter(iterable)
    return {key for key, count in counter.items() if count > 1}