def invert_dict0(adict):
    """
    for a key:value dict, return value:[key(s)],
    e.g. dict[doc] = label --> dict[label] = [docs]
    """
    inv_dict = {}
    [inv_dict.setdefault(v, []).append(k) for k, v in adict.iteritems()]
    return inv_dict