any functional programming method of traversing a nested dictionary?,"from functools import reduce