def _merge(old, new):
    """assume both are mappings, and the old is our mutable result"""
    from collections import Mapping
    if new is None:
        return
    for key in new:
        if isinstance(new[key], Mapping):
            if isinstance(old.get(key), Mapping):
                yield old[key], new[key]
            else:
                old[key] = dict(new[key])
        else:
            old[key] = new[key]
