def get_dict_leaves(dictionary):
    """Get the set of all leaves of a dictionary.

    Parameters
    ----------
    dictionary : dict
        A dictionary or nested dictionary.

    Returns
    -------
    vals : set
        Set of leaf values.

    """
    vals = []
    for k in dictionary:
        if isinstance(dictionary[k], dict):
            for val in get_dict_leaves(dictionary[k]):
                vals.append(val)
        else:
            if hasattr(dictionary[k], '__iter__'):
                for val in dictionary[k]:
                    vals.append(val)
            else:
                vals.append(dictionary[k])

    return set(vals)