def reverse_dict(d):
    result = {}
    for key in d:
        for val in d[key]:
            result[val] = result.get(val, tuple()) + (key, )
    return result
Reverses direction of dependence dict.
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/gof/sched.py/reverse_dict