(one, two, resolvefn)
return merged
Merges two dicts. The algorithm is to first create a dictionary of all the keys that exist in one and
    two but not in both. Then iterate over each key that belongs in both while calling the resovlefn function
    to ensure the propery value gets set.

    :param one: The first dictionary
    :param two: The second dictionary
    :param resolvefn: A function that takes two values and resolves to one
    :returns: The merged dictionary
Merges two dicts. The algorithm is to first create a dictionary of all the keys that exist in one and
    two but not in both. Then iterate over each key that belongs in both while calling the resovlefn function
    to ensure the propery value gets set.
Merges two dicts . The algorithm is to first create a dictionary of all the keys that exist in one and two but not in both . Then iterate over each key that belongs in both while calling the resovlefn function to ensure the propery value gets set .
def _merge_dicts(one, two, resolvefn):
    """Merges two dicts. The algorithm is to first create a dictionary of all the keys that exist in one and
    two but not in both. Then iterate over each key that belongs in both while calling the resovlefn function
    to ensure the propery value gets set.

    :param one: The first dictionary
    :param two: The second dictionary
    :param resolvefn: A function that takes two values and resolves to one
    :returns: The merged dictionary
    """
    # keys either in one or two, but not both
    merged = {
        key: one.get(key, two.get(key))
        for key in one.keys() ^ two.keys()
    }

    # merge keys that exist in both
    merged.update({
        key: resolvefn(one[key], two[key])
        for key in one.keys() & two.keys()
    })
    return merged
def _merge_dicts ( one , two , resolvefn ) : # keys either in one or two, but not both merged = { key : one . get ( key , two . get ( key ) ) for key in one . keys ( ) ^ two . keys ( ) } # merge keys that exist in both merged . update ( { key : resolvefn ( one [ key ] , two [ key ] ) for key in one . keys ( ) & two . keys ( ) } ) return merged