def compareDicts(dict1, dict2):
    """ Compare two dictionaries, returning sets containing keys from
    dict1 difference dict2, dict2 difference dict1, and shared keys with
    non-equivalent values, respectively.

    Parameters
    ----------
    dict1 : dict
    dict2 : dict

    Returns
    -------
    set, set, set
    """
    d1_keys = set(dict1.keys())
    d2_keys = set(dict2.keys())
    new = d1_keys - d2_keys
    missing = d2_keys - d1_keys
    modified = {k for k in d1_keys & d2_keys if dict1[k] != dict2[k]}
    return new, missing, modified