python update nested dictionary value by key