shaders_dict = {'a': 'somePath', 'b': 'somePath', 'c': 'differentPath', 'd':
    'differentPath'}
inverse_dict = defaultdict(list)
for k, v in shaders_dict.items():
    inverse_dict[v].append(k)
inverse_dict
Extract duplicate values from a dictionary