the update here means to update the value itself, instead of replacing it.
the update in add is from ```d={'x': {'y':1}}```, add ```{'z':2}``` gives  ```d={'x': {'z':2}}``` (ie replace with new value, but update the dict ```d```; this is what ```dict.update``` does). in add_data, update means ```d={'x': {'y':1}}```, add ```{'z':2}``` gives  ```d={'x': {'y': 1, 'z':2}}``` ie update the dict ```d``` by updating the value.