def invert_hash(h):
    ih = {}

    for key,value in h.iteritems():
        if value not in ih:
            ih[value] = []
        ih[value].append(key)

    return ih
dataset/ETHPy150Open gyim/stupidgit/stupidgit_gui/util.py/invert_hash/original