def merge(dest, source):
    """In-place, recursive merge of two dictionaries."""
    for key in source:
        if key in dest:
            if isinstance(dest[key], dict) and isinstance(source[key], dict):
                merge(dest[key], source[key])
                continue

        dest[key] = source[key]

    return dest