def updater(old, new):
    """Recursively update a dict. """

    for k, v in new.items():
        if type(v) == dict:
            old[k] = updater(old.get(k, {}), v)
        else:
            old[k] = v
    return old