def _get_dep_to_files(file2deps, mod2files):

        dep2files = {}
        tmp_file2deps = {}

        for file, mods in file2deps.items():
            for mod in mods:
                files = mod2files[mod]
                tmp_file2deps.setdefault(file, set()).update(files)
                for f in files:
                    dep2files.setdefault(f, set()).add(file)

        return dep2files, tmp_file2deps