Returns a list of all of the system group IDs of which the user
    is a member.

def get_gid_list(user, include_default=True):
    '''
    Returns a list of all of the system group IDs of which the user
    is a member.
    '''
    if HAS_GRP is False or HAS_PWD is False:
        return []
    gid_list = list(
        six.itervalues(
            get_group_dict(user, include_default=include_default)
        )
    )
    return sorted(set(gid_list))