def METHOD_NAME(origdict, newdict):
    """Update a dictionary in place, recursing to do a depth-first deep copy.
    """
    for key, value in newdict.items():
        if isinstance(value, Mapping):
            origdict[key] = METHOD_NAME(origdict.get(key, {}), value)
        else:
            origdict[key] = value
    return origdict