def merge_dicts(origin, patch):
    """
    Merge two dictionaries, w/o overwriting missing keys

    :param origin: The origin dictionary
    :param patch: The dictionary containing the diffs
    :return: The result of the merge: a new dictionary
    """

    for key in patch:
        if key in origin:
            if isinstance(origin[key], dict) and isinstance(patch[key], dict):
                merge_dicts(origin[key], patch[key])
            else:
                origin[key] = patch[key]
        else:
            origin[key] = patch[key]
    return origin