This is an implementation of inspect.getmembers, as in some versions
    of python it may be buggy.
    See issue at http://bugs.python.org/issue1785
971080
def getmembers(_object, _predicate):
    """"""
    # This should be:
    #return inspect.getmembers(_object, _predicate)

    # ... and it is re-implemented as:
    observers = []
    for key in dir(_object):
        try: m = getattr(_object, key)
        except AttributeError: continue
        if _predicate(m): observers.append((key, m))
        pass
    return observers
353515
def collect_members(module_to_name):
  
  members = {}
  for module, module_name in module_to_name.items():
    all_names = getattr(module, "__all__", None)
    for name, member in inspect.getmembers(module):
      if ((inspect.isfunction(member) or inspect.isclass(member)) and
          not _always_drop_symbol_re.match(name) and
          (all_names is None or name in all_names)):
        fullname = '%s.%s' % (module_name, name)
        if name in members:
          other_fullname, other_member = members[name]
          if member is not other_member:
            raise RuntimeError("Short name collision between %s and %s" %
                               (fullname, other_fullname))
          if len(fullname) == len(other_fullname):
            raise RuntimeError("Can't decide whether to use %s or %s for %s: "
                               "both full names have length %d" %
                               (fullname, other_fullname, name, len(fullname)))
          if len(fullname) > len(other_fullname):
            continue  # Use the shorter full name
        members[name] = fullname, member
  return members
206324
def get_members(self, api=None):
        
        api = api or self._API

        response = api.get(url=self._URL['members'].format(id=self.id))

        data = response.json()
        total = response.headers['x-total-matching-query']
        members = [Member(api=api, **member) for member in data['items']]
        links = [Link(**link) for link in data['links']]
        href = data['href']

        return Collection(
            resource=Member,
            href=href,
            total=total,
            items=members,
            links=links,
            api=api
        )
124153
private String memberName(Member member) {
        if (member instanceof Constructor)
            return member.getDeclaringClass().getSimpleName();
        else
            return member.getName();
    }
885932
def inspect_members(self):
        
        if not self._inspect_members:
            TemplateGenerator._inspect_members = \
                self._import_all_troposphere_modules()
        return self._inspect_members
1053871
def _str_member_list(self, name):
        
        out = []
        if self[name]:
            out += ['.. rubric:: %s' % name, '']
            prefix = getattr(self, '_name', '')

            if prefix:
                prefix = '~%s.' % prefix

            autosum = []
            others = []
            for param, param_type, desc in self[name]:
                param = param.strip()

                # Check if the referenced member can have a docstring or not
                param_obj = getattr(self._obj, param, None)
                if not (isinstance(param_obj, collections.Callable)
                        or isinstance(param_obj, property)
                        or inspect.isgetsetdescriptor(param_obj)):
                    param_obj = None

                if param_obj and (pydoc.getdoc(param_obj) or not desc):
                    # Referenced object has a docstring
                    autosum += ["   %s%s" % (prefix, param)]
                else:
                    others.append((param, param_type, desc))

            if autosum:
                out += ['.. autosummary::']
                if self.class_members_toctree:
                    out += ['   :toctree:']
                out += [''] + autosum

            if others:
                maxlen_0 = max(3, max([len(x[0]) for x in others]))
                hdr = sixu("=")*maxlen_0 + sixu("  ") + sixu("=")*10
                fmt = sixu('%%%ds  %%s  ') % (maxlen_0,)
                out += ['', hdr]
                for param, param_type, desc in others:
                    desc = sixu(" ").join(x.strip() for x in desc).strip()
                    if param_type:
                        desc = "(%s) %s" % (param_type, desc)
                    out += [fmt % (param.strip(), desc)]
                out += [hdr]
            out += ['']
        return out
1338371
public List<String> getMembers() {
    List<String> allList = new ArrayList<String>();
    allList.addAll(members);

    return Collections.unmodifiableList(allList);
  }
511849
public com.google.protobuf.ByteString
      getMemberBytes() {
    java.lang.Object ref = member_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      member_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
951915
def get(self, thread_uuid, uuid):
        
        members = (v for v in self.list(thread_uuid) if v.get('userUuid') == uuid)
        for i in members:
            self.log.debug(i)
            return i
        return None
1179328
@Override
    public Object getMember(String name) {
        switch (name) {
            case "values":
                return F_values;
            case "indices":
                return F_indices;

        }
        return super.getMember(name);
    }
196914
def read_members_of(self, member_id, query_membership=None):
        
        route_values = {}
        if member_id is not None:
            route_values['memberId'] = self._serialize.url('member_id', member_id, 'str')
        query_parameters = {}
        if query_membership is not None:
            query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str')
        response = self._send(http_method='GET',
                              location_id='22865b02-9e4a-479e-9e18-e35b8803b8a0',
                              version='5.0-preview.1',
                              route_values=route_values,
                              query_parameters=query_parameters)
        return self._deserialize('[str]', self._unwrap_collection(response))
26274
def getmembers(self):
        '''
        
        '''
        if self._members is None:
            self._members = _members = []
            g = self.data_file
            magic = g.read(2)
            while magic:
                if magic == b'07':
                    magic += g.read(4)
                    member = RPMInfo._read(magic, g)

                    if member.name == 'TRAILER!!!':
                        break

                    if not member.isdir:
                        _members.append(member)

                magic = g.read(2)
            return _members
        return self._members
472057
private static Executable readMember(ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        if (!in.readBoolean())
            return null;
        boolean isMethod = in.readBoolean();
        String name = (String) in.readObject();
        Class<?> declaring = (Class<?>) in.readObject();
        Class<?>[] parms = readParameters(in);
        try {
            if (isMethod) {
                return declaring.getMethod(name, parms);
            }
            return declaring.getConstructor(parms);
        } catch (NoSuchMethodException e) {
            throw new IOException("Cannot find member: " + e);
        }
    }
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
107800
def read_members(self, container_id, query_membership=None):
        
        route_values = {}
        if container_id is not None:
            route_values['containerId'] = self._serialize.url('container_id', container_id, 'str')
        query_parameters = {}
        if query_membership is not None:
            query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str')
        response = self._send(http_method='GET',
                              location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775',
                              version='5.0-preview.1',
                              route_values=route_values,
                              query_parameters=query_parameters)
        return self._deserialize('[str]', self._unwrap_collection(response))
354360
def getschemas(cls):
        
        members = getmembers(cls, lambda member: isinstance(member, Schema))

        result = OrderedDict()

        for name, member in members:
            result[name] = member

        return result
835965
def get_members(self, selector):
        
        members = []
        for member in self.get_member_list():
            if selector.select(member):
                members.append(member)

        return members