def dependency_dict(dsk):

    dep_dict = {}
    for key in dsk:
        deps = tuple(get_dependencies(dsk, key, True))
        dep_dict.setdefault(deps, []).append(key)
    return dep_dict
Create a dict matching ordered dependencies to keys.
dataset/ETHPy150Open dask/dask/dask/optimize.py/dependency_dict