Find the member of the Virtual Organization that I haven't already
        spoken too
196125
def members_to_ask(self, name_id):
        

        vo_members = self._affiliation_members()
        for member in self.member:
            if member not in vo_members:
                vo_members.append(member)

        # Remove the ones I have cached data from about this subject
        vo_members = [m for m in vo_members if not self.sp.users.cache.active(
            name_id, m)]
        logger.info("VO members (not cached): %s", vo_members)
        return vo_members
276380
def get_current_user():
    """"""
    thread_local = AutomatedLoggingMiddleware.thread_local
    if hasattr(thread_local, 'current_user'):
        user = thread_local.current_user
        if isinstance(user, AnonymousUser):
            user = None
    else:
        user = None

    return user
1087428
def get_current_membership_for_org(self, account_num, verbose=False):
        
        all_memberships = self.get_memberships_for_org(
            account_num=account_num,
            verbose=verbose)
        # Look for first membership that hasn't expired yet.
        for membership in all_memberships:
            if (membership.expiration_date and
                membership.expiration_date > datetime.datetime.now()):  # noqa
                return membership  # noqa
        return None
347315
def check_member(m)
      potential_members = self.class::MEMBER_CLASS.map_all_ids_to(:name, api: @api)
      if m.to_s =~ /^\d+$/
        return { id: m.to_i, name: potential_members[m] } if potential_members.key?(m.to_i)
      else
        return { name: m, id: potential_members.invert[m] } if potential_members.value?(m)
      end
      raise JSS::NoSuchItemError, "No #{self.class::MEMBER_CLASS::RSRC_OBJECT_KEY} matching '#{m}' in the JSS."
    end
683398
def active_joined_organisations(doc):
    """"""
    if doc.get('type') == 'user' and doc.get('state') != 'deactivated':
        for org_id, state in doc.get('organisations', {}).items():
            if state['state'] == 'deactivated':
                continue

            org = {'_id': org_id}
            yield [doc['_id'], None], org

            try:
                yield [doc['_id'], state['state']], org
            except KeyError:
                pass
917378
function determineIfIncludesMe(assocSignersByPath, handleResult){
	var assocMemberAddresses = {};
	for (var signing_path in assocSignersByPath){
		var signerInfo = assocSignersByPath[signing_path];
	//	if (signerInfo.device_address === device.getMyDeviceAddress())
		if (signerInfo.address)
			assocMemberAddresses[signerInfo.address] = true;
	}
	var arrMemberAddresses = Object.keys(assocMemberAddresses);
	if (arrMemberAddresses.length === 0)
		return handleResult("no member addresses?");
	db.query(
		"SELECT address FROM my_addresses WHERE address IN(?) UNION SELECT shared_address AS address FROM shared_addresses WHERE shared_address IN(?)", 
		[arrMemberAddresses, arrMemberAddresses],
		function(rows){
		//	handleResult(rows.length === arrMyMemberAddresses.length ? null : "Some of my member addresses not found");
			handleResult(rows.length > 0 ? null : "I am not a member of this shared address");
		}
	);
}
146545
def get_outside_collaborators(self, filter_=github.GithubObject.NotSet):
        
        assert (filter_ is github.GithubObject.NotSet or
                isinstance(filter_, (str, unicode))), filter_

        url_parameters = {}
        if filter_ is not github.GithubObject.NotSet:
            url_parameters["filter"] = filter_
        return github.PaginatedList.PaginatedList(
            github.NamedUser.NamedUser,
            self._requester,
            self.url + "/outside_collaborators",
            url_parameters
        )
391347
def member_info(self, cluster_id, member_id):
        """"""
        cluster = self._storage[cluster_id]
        return cluster.member_info(member_id)
27781
def joined_organisations(doc):
    """"""
    if doc.get('type') == 'user':
        for org_id, state in doc.get('organisations', {}).items():
            org = {'_id': org_id}
            yield [doc['_id'], None], org

            try:
                yield [doc['_id'], state['state']], org
            except KeyError:
                pass
24337
def members(name, members_list, root=None):
    '''
    
    '''
    cmd = 'chgrpmem -m = {0} {1}'.format(members_list, name)
    retcode = __salt__['cmd.retcode'](cmd, python_shell=False)

    return not retcode
1173262
def member_of(self, group):
        
        if isinstance(group, Group):
            group = group.name
        return self.groups.filter(name=group).exists()
761091
def organizations(self, user, include=None):
        
        return self._query_zendesk(self.endpoint.organizations, 'organization', id=user, include=include)
3194
def get_members(self, offset=None, limit=None, api=None):
        
        api = api or self._API
        return AutomationMember.query(
            automation=self.id, offset=offset, limit=limit, api=api
        )
818421
def member(self, user, objects=False):
        
        try:
            member = self.search(uid=user, objects=objects)[0]
        except IndexError:
            return None
        if objects:
            return member
        return member[1]
568692
def organization_related(self, id, **kwargs):
        ""
        api_path = "/api/v2/organizations/{id}/related.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
44519
def match_member_id(self, member_conf, current_member_confs):
        
        if current_member_confs is None:
            return None

        for curr_mem_conf in current_member_confs:
            if is_same_address(member_conf['host'], curr_mem_conf['host']):
                return curr_mem_conf['_id']

        return None
79998
def organization_membership_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/organization_memberships/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)