def _diff_dicts(a, b, path):
    if (not isinstance(a, type(b))):
        return [(path[:], type(a), type(b))]
    returned = []
    for key in (set(a) | set(b)):
        a_value = a.get(key, NO_VALUE)
        b_value = b.get(key, NO_VALUE)
        path.append(key)
        if ((a_value is NO_VALUE) or (b_value is NO_VALUE)):
            returned.append((path[:], a_value, b_value))
        else:
            returned.extend(diff(a_value, b_value, path))
        path.pop()
    return returned
def _diff_dicts(a, b, path):
    if (not isinstance(a, type(b))):
        return [(path[:], type(a), type(b))]
    returned = []
    for key in (set(a) | set(b)):
        a_value = a.get(key, NO_VALUE)
        b_value = b.get(key, NO_VALUE)
        path.append(key)
        if ((a_value is NO_VALUE) or (b_value is NO_VALUE)):
            returned.append((path[:], a_value, b_value))
        else:
            returned.extend(diff(a_value, b_value, path))
        path.pop()
    return returned