def are_equal_on_common_keys(dict1, dict2):
    """
    Return True if and only if all (nested) values of the dicts are the same for the keys (paths) they share
    :param dict1:
    :param dict2:
    :return:
    """
    for k in dict1:
        if k in dict2:
            v1 = dict1[k]
            v2 = dict2[k]
            if isinstance(v1, dict):
                if isinstance(v2, dict):
                    if not are_equal_on_common_keys(v1, v2):
                        return False
                else:
                    return False
            else:
                if v1 != v2:
                    return False
    return True