<human>:  Python - How to calculate equal parts of two dictionaries?
<bot>: Here is some code to get set intersection between dictionaries `d1` and `d2`

dict((x, set(y) & set(d1.get(x, ()))) for x, y in d2.items())

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.