Return the GroupMemberships for this group.

        :param include: list of objects to sideload. `Side-loading API Docs 
            <https://developer.zendesk.com/rest_api/docs/core/side_loading>`__.
        :param group: Group object or id
174797
def memberships(self, group, include=None):
        
        return self._get(self._build_url(self.endpoint.memberships(id=group, include=include)))
240979
@RunAsSystem
  public Group getGroup(String groupName) {
    Fetch roleFetch = new Fetch().field(RoleMetadata.NAME).field(RoleMetadata.LABEL);
    Fetch fetch =
        new Fetch()
            .field(GroupMetadata.ROLES, roleFetch)
            .field(GroupMetadata.NAME)
            .field(GroupMetadata.LABEL)
            .field(GroupMetadata.DESCRIPTION)
            .field(GroupMetadata.ID)
            .field(GroupMetadata.PUBLIC)
            .field(GroupMetadata.ROOT_PACKAGE);

    Group group =
        dataService
            .query(GroupMetadata.GROUP, Group.class)
            .eq(GroupMetadata.NAME, groupName)
            .fetch(fetch)
            .findOne();
    if (group == null) {
      throw new UnknownEntityException(
          groupMetadata, groupMetadata.getAttribute(GroupMetadata.NAME), groupName);
    }
    return group;
  }
1246741
def get_roles(self, groups):
        """"""
        roles = set([])
        parentroles = set([])
        notroles = set([])
        tmp = set([])
        usedgroups = {}
        unusedgroups = {}
        ret = {}
        # determine roles membership
        for role in self.roles:
            if self._check_member(
                    role, groups, notroles,
                    tmp, parentroles, usedgroups):
                roles.add(role)
        # determine standalone groups not matching any roles
        for b in groups:
            for g in groups[b]:
                if b not in usedgroups or g not in usedgroups[b]:
                    if b not in unusedgroups:
                        unusedgroups[b] = set([])
                    unusedgroups[b].add(g)

        ret['roles'] = roles
        ret['unusedgroups'] = unusedgroups
        return ret
1283515
def getmembers(self):
        
        self._check()
        if not self._loaded:    # if we want to obtain a list of
            self._load()        # all members, we first have to
                                # scan the whole archive.
        return self.members
366039
def group_members(self, group):
        
        if self._version < (6, 0, 0):
            raise NotImplementedError(
                "Group members is not implemented in JIRA before version 6.0, upgrade the instance, if possible.")

        params = {'groupname': group, 'expand': "users"}
        r = self._get_json('group', params=params)
        size = r['users']['size']
        end_index = r['users']['end-index']

        while end_index < size - 1:
            params = {'groupname': group, 'expand': "users[%s:%s]" % (
                end_index + 1, end_index + 50)}
            r2 = self._get_json('group', params=params)
            for user in r2['users']['items']:
                r['users']['items'].append(user)
            end_index = r2['users']['end-index']
            size = r['users']['size']

        result = {}
        for user in r['users']['items']:
            result[user['key']] = {'name': user['name'],
                                   'fullname': user['displayName'],
                                   'email': user.get('emailAddress', 'hidden'),
                                   'active': user['active']}
        return OrderedDict(sorted(result.items(), key=lambda t: t[0]))
485052
def user_group_memberships(self, user_id, **kwargs):
        ""
        api_path = "/api/v2/users/{user_id}/group_memberships.json"
        api_path = api_path.format(user_id=user_id)
        return self.call(api_path, **kwargs)
1341502
def get_members_of_group(self, gname):
        
        hostgroup = self.find_by_name(gname)
        if hostgroup:
            return hostgroup.get_hosts()
        return []
1108803
def get_group(id):
    
    acl_url = urljoin(_acl_url(), 'groups/{}'.format(id))
    try:
        r = http.get(acl_url)
        return r.json()
    except DCOSHTTPException as e:
        if e.response.status_code != 400:
            raise
761091
def organizations(self, user, include=None):
        
        return self._query_zendesk(self.endpoint.organizations, 'organization', id=user, include=include)
1180790
def _get_side1KerningGroups(self):
        
        found = {}
        for name, contents in self.items():
            if name.startswith("public.kern1."):
                found[name] = contents
        return found
1351806
def get_memberships(self):
        

        response = self._get_xml(self.rest_url + "/group/membership")

        if not response.ok:
            return None

        xmltree = etree.fromstring(response.content)
        memberships = {}
        for mg in xmltree.findall('membership'):
            # coerce values to unicode in a python 2 and 3 compatible way
            group = u'{}'.format(mg.get('group'))
            users = [u'{}'.format(u.get('name')) for u in mg.find('users').findall('user')]
            groups = [u'{}'.format(g.get('name')) for g in mg.find('groups').findall('group')]
            memberships[group] = {u'users': users, u'groups': groups}
        return memberships
430366
def get_group_admin(self, group):
        
        data = {
            'name': group,
        }
        response = _fix_group(self.post('getGroupAdmin', data))
        return response
1289702
def getgroupmembers(self, group_id, page=1, per_page=20):
        
        data = {'page': page, 'per_page': per_page}

        request = requests.get(
            '{0}/{1}/members'.format(self.groups_url, group_id), params=data,
            headers=self.headers, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        if request.status_code == 200:
            return request.json()
        else:
            return False
1154677
def list_member_groups(self, member_id):

        ''' 
        '''

    # https://www.meetup.com/meetup_api/docs/members/:member_id/#get

        title = '%s.list_member_groups' % self.__class__.__name__

    # validate inputs
        input_fields = {
            'member_id': member_id
        }
        for key, value in input_fields.items():
            if value:
                object_title = '%s(%s=%s)' % (title, key, str(value))
                self.fields.validate(value, '.%s' % key, object_title)

    # construct member id
        if not member_id:
            raise IndexError('%s requires member id argument.' % title)

    # compose request fields
        url = '%s/members/%s' % (self.endpoint, str(member_id))
        params = {
            'fields': 'memberships'
        }

    # send requests
        response_details = self._get_request(url, params=params)

    # construct method output dictionary
        member_groups = {
            'json': []
        }
        for key, value in response_details.items():
            if not key == 'json':
                member_groups[key] = value

    # parse response
        if response_details['json']:
            if 'memberships' in response_details['json'].keys():
                for group in response_details['json']['memberships']['member']:
                    member_groups['json'].append(self.objects.group_profile.ingest(**group))

        return member_groups
322235
def get_groups(self, username):
        
        try:
            return self.users[username]['groups']
        except Exception as e:
            raise UserDoesntExist(username, self.backend_name)
490541
def members(self):
        
        if self._members is None:
            self._members = Feed(self.links["members"], pypump=self._pump)
        return self._members
485109
def fetch_groups(groups):
    
    hidden_groups = current_app.config.get(
        'OAUTHCLIENT_CERN_HIDDEN_GROUPS', OAUTHCLIENT_CERN_HIDDEN_GROUPS)
    hidden_groups_re = current_app.config.get(
        'OAUTHCLIENT_CERN_HIDDEN_GROUPS_RE',
        OAUTHCLIENT_CERN_HIDDEN_GROUPS_RE)
    groups = [group for group in groups if group not in hidden_groups]
    filter_groups = []
    for regexp in hidden_groups_re:
        for group in groups:
            if regexp.match(group):
                filter_groups.append(group)
    groups = [group for group in groups if group not in filter_groups]

    return groups