from functools import reduce
def func(a):
    res = {}
keys = list(a.keys())
common = reduce(lambda x, y: x & y, [set(a[i].keys()) for i in keys])
for k in keys:
    temp = {}
for c in common:
    temp[c] = a[k][c]
res[k] = temp
return res
new dictionary with common subkey