Gets the group association from a Indicator/Group/Victim

        Args:
            group_type:
            api_entity:
            api_branch:
            params:

        Returns:
553867
def group_associations_types(self, group_type, api_entity=None, api_branch=None, params=None):
        
        if params is None:
            params = {}
        if not self.can_update():
            self._tcex.handle_error(910, [self.type])

        target = self._tcex.ti.group(group_type)

        for gat in self.tc_requests.group_associations_types(
            self.api_type,
            self.api_sub_type,
            self.unique_id,
            target,
            api_entity=api_entity,
            api_branch=api_branch,
            owner=self.owner,
            params=params,
        ):
            yield gat
738237
def get_pointgroup(self, tolerance=0.3):
        
        PA = self._get_point_group_analyzer(tolerance=tolerance)
        return PointGroupOperations(PA.sch_symbol, PA.symmops)
243144
def fetch_group(group_id, failures=True, wait=0, count=None, cached=Conf.CACHED):
    
    if cached:
        return fetch_group_cached(group_id, failures, wait, count)
    start = time()
    if count:
        while True:
            if count_group(group_id) == count or wait and (time() - start) * 1000 >= wait >= 0:
                break
            sleep(0.01)
    while True:
        r = Task.get_task_group(group_id, failures)
        if r:
            return r
        if (time() - start) * 1000 >= wait >= 0:
            break
        sleep(0.01)
707178
def data_group_association(self, xid):
        
        groups = []
        group_data = None

        # get group data from one of the arrays
        if self.groups.get(xid) is not None:
            group_data = self.groups.get(xid)
            del self.groups[xid]
        elif self.groups_shelf.get(xid) is not None:
            group_data = self.groups_shelf.get(xid)
            del self.groups_shelf[xid]

        if group_data is not None:
            # convert any obj into dict and process file data
            group_data = self.data_group_type(group_data)
            groups.append(group_data)

            # recursively get associations
            for assoc_xid in group_data.get('associatedGroupXid', []):
                groups.extend(self.data_group_association(assoc_xid))

        return groups
893581
def fetch_group(query):
    """"""
    group_filter = {'pk': query} if query.isdigit() else {'name': query}

    try:
        return Group.objects.get(**group_filter)
    except Group.DoesNotExist:
        raise exceptions.ParseError("Unknown group: {}".format(query))
1058793
def group_indices(self):
        
        # No groups
        if not self.plydata_groups:
            return np.ones(len(self), dtype=int)

        grouper = self.groupby()
        indices = np.empty(len(self), dtype=int)
        for i, (_, idx) in enumerate(sorted(grouper.indices.items())):
            indices[idx] = i
        return indices
626472
def get_group_details(self, group):
        
        result = {}
        try:
            lgroup = self._get_group(group.name)
            lgroup = preload(lgroup, database=self._database)
        except ObjectDoesNotExist:
            return result

        for i, j in lgroup.items():
            if j is not None:
                result[i] = j

        return result
195681
def _getAttrGroupMember(self, attrGroup, attr):
        
        method_name = '%s_%s' % (attrGroup, attr)
        return getattr(self, method_name)
648917
def ib_group_member_list(self, group_id):
        '''  '''
        req_hook = 'pod/v1/admin/group/' + group_id + '/membership/list'
        req_args = None
        status_code, response = self.__rest__.GET_query(req_hook, req_args)
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
505322
def get_group_members(self, group):
        

        conn = self.bind
        try:
            records = conn.search_s(
                current_app.config['LDAP_BASE_DN'], ldap.SCOPE_SUBTREE,
                ldap_filter.filter_format(
                    current_app.config['LDAP_GROUP_OBJECT_FILTER'], (group,)),
                [current_app.config['LDAP_GROUP_MEMBERS_FIELD']])
            conn.unbind_s()
            if records:
                if current_app.config['LDAP_GROUP_MEMBERS_FIELD'] in \
                        records[0][1]:
                    members = records[0][1][
                        current_app.config['LDAP_GROUP_MEMBERS_FIELD']]
                    if sys.version_info[0] > 2:
                        members = [m.decode('utf-8') for m in members]
                    return members
        except ldap.LDAPError as e:
            raise LDAPException(self.error(e.args))
476242
async def listHookGroups(self, *args, **kwargs):
        

        return await self._makeApiCall(self.funcinfo["listHookGroups"], *args, **kwargs)
205899
def memberships_assignable(self, group, include=None):
        
        return self._get(self._build_url(self.endpoint.memberships_assignable(id=group, include=include)))
443
def group_id(self):
        
        if self.derived_from is not None:
            return self.derived_from.group_id()
        if self.file_uuid is None:
            return None
        return utils.GROUP_ID_PREFIX + self.file_uuid
1173262
def member_of(self, group):
        
        if isinstance(group, Group):
            group = group.name
        return self.groups.filter(name=group).exists()
710907
def get_group(self, group_name):
        
        response = self.client.get_group(GroupName=group_name,
                                         UserPoolId=self.user_pool_id)
        return self.get_group_obj(response.get('Group'))
571148
public static IGroupMember getGroupMember(String key, Class<?> type) throws GroupsException {
        /*
         * WARNING:  The 'type' parameter is not the leafType;  you're obligated
         * to say whether you want a group or a non-group (i.e. some type of
         * entity).  In fact, the underlying implementation blindly instantiates
         * whatever you tell it to.
         */

        LOGGER.trace("Invoking getEntity for key='{}', type='{}'", key, type);
        return instance().igetGroupMember(key, type);
    }
217482
@Override
    public IGroupMember getGroupMember(String key, Class type) throws GroupsException {
        IGroupMember gm = null;
        if (type == ICompositeGroupService.GROUP_ENTITY_TYPE) gm = findGroup(key);
        else gm = getEntity(key, type);
        return gm;
    }