Takes a chamber and Congress,
        OR state and district, returning a list of members
422737
def filter(self, chamber, congress=CURRENT_CONGRESS, **kwargs):
        
        check_chamber(chamber)

        kwargs.update(chamber=chamber, congress=congress)

        if 'state' in kwargs and 'district' in kwargs:
            path = ("members/{chamber}/{state}/{district}/"
                    "current.json").format(**kwargs)

        elif 'state' in kwargs:
            path = ("members/{chamber}/{state}/"
                    "current.json").format(**kwargs)

        else:
            path = ("{congress}/{chamber}/"
                    "members.json").format(**kwargs)

        return self.fetch(path, parse=lambda r: r['results'])
579128
def extract_committees(bill):
    
    bill_id = bill.get('bill_id', None)
    logger.debug("Extracting Committees for {0}".format(bill_id))

    committees = bill.get('committees', None)
    committee_map = []

    for c in committees:
        logger.debug("Processing committee {0}".format(c.get('committee_id')))
        c_list = []
        sub = c.get('subcommittee_id')
        if sub:
            logger.debug("is subcommittee")
            c_list.append('subcommittee')  # type
            c_list.append(c.get('subcommittee'))
            sub_id = "{0}-{1}".format(
                c.get('committee_id'), c.get('subcommittee_id'))
            logger.debug("Processing subcommittee {0}".format(sub_id))
            c_list.append(sub_id)
        else:
            c_list.append('committee')
            c_list.append(c.get('committee'))
            c_list.append(c.get('committee_id'))
        c_list.append(bill_id)
        committee_map.append(c_list)
    return committee_map
474521
def lists(self, column, key=None):
        
        columns = self._get_list_select(column, key)

        if key is not None:
            results = {}
            for result in self.get(columns):
                results[result[key]] = result[column]
        else:
            results = Collection(list(map(lambda x: x[column], self.get(columns))))

        return results
778749
def get_memberships_for_org(self, account_num, verbose=False):
        
        if not self.client.session_id:
            self.client.request_session()

        query = "SELECT Objects() FROM Membership " \
                "WHERE Owner = '%s' ORDER BY ExpirationDate" % account_num

        membership_list = self.get_long_query(query, verbose=verbose)
        return membership_list or []
831379
def extract_sponsor(bill):
    
    logger.debug("Extracting Sponsor")
    sponsor_map = []
    sponsor = bill.get('sponsor', None)
    if sponsor:
        sponsor_map.append(sponsor.get('type'))
        sponsor_map.append(sponsor.get('thomas_id'))
        sponsor_map.append(bill.get('bill_id'))
        sponsor_map.append(sponsor.get('district'))
        sponsor_map.append(sponsor.get('state'))
    logger.debug("END Extracting Sponsor")
    return sponsor_map if sponsor_map else None
132537
def room_members(self, stream_id):
        '''  '''
        req_hook = 'pod/v2/room/' + str(stream_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
366721
def subscribers(self):
        """"""
        return [s for p, s in sorted(self._subscribers, key=lambda x: x[0])]
679696
def upcoming(self, chamber, congress=CURRENT_CONGRESS):
        ""
        path = "bills/upcoming/{chamber}.json".format(chamber=chamber)
        return self.fetch(path)
875237
def by_type(self, chamber, type, congress=CURRENT_CONGRESS):
        ""
        check_chamber(chamber)

        path = "{congress}/{chamber}/votes/{type}.json".format(
            congress=congress, chamber=chamber, type=type)
        return self.fetch(path)
1223497
def list_lbaas_members(self, lbaas_pool, retrieve_all=True, **_params):
        """"""
        return self.list('members', self.lbaas_members_path % lbaas_pool,
                         retrieve_all, **_params)
1265295
def get_elections(self, obj):
        """"""
        election_day = ElectionDay.objects.get(
            date=self.context['election_date'])

        elections = list(obj.elections.filter(election_day=election_day))
        district = DivisionLevel.objects.get(name=DivisionLevel.DISTRICT)
        for district in obj.children.filter(level=district):
            elections.extend(
                list(district.elections.filter(
                    election_day=election_day,
                    meta__isnull=False
                ))
            )

        return ElectionSerializer(elections, many=True).data
291582
def members(self):
        

        if self._this_occupant is not None:
            items = [self._this_occupant]
        else:
            items = []
        items += list(self._occupant_info.values())
        return items
281199
def get_candidates(self):
        """"""
        candidate_elections = CandidateElection.objects.filter(election=self)

        return [ce.candidate for ce in candidate_elections]
1142480
def members(self):
        
        if self._members is None:
            self._members = MemberList(
                self._version,
                service_sid=self._solution['service_sid'],
                channel_sid=self._solution['sid'],
            )
        return self._members
724
private synchronized List<Entry> getEntriesList( DirectoryEntry directory )
    {
        List<Entry> entries = contents.get( directory );
        if ( entries == null )
        {
            entries = new ArrayList<Entry>();
            contents.put( directory, entries );
        }
        return entries;
    }
1267000
def frommembers(cls, members=()):
        """"""
        return cls.fromint(sum(map(cls._map.__getitem__, set(members))))
603446
def members(self):
        
        res = [self]
        for c in list(self.children.values()):
            res.extend(c.members)
        return res