def get_group_set(policy):
    """Get the set of group names in a policy
    
    Parameters
    ----------
    policy : dict
        Dictionary defining the policy
    
    Returns
    -------
    set
        The group names in the policy
    """
    return set(policy.keys()) - {'shared'}
