def get_gid_list(user=None, include_default=True):
    if HAS_GRP is False or HAS_PWD is False:
        # We don't work on platforms that don't have grp and pwd
        # Just return an empty list
        return []
    gid_list = [
            gid for (group, gid) in
            six.iteritems(salt.utils.get_group_dict(user, include_default=include_default))
    ]
    return sorted(set(gid_list))
Returns a list of all of the system group IDs of which the user
dataset/ETHPy150Open saltstack/salt/salt/utils/__init__.py/get_gid_list