Ensures :attr:`subject` is an iterable containing only objects of class *prototype*.
508342
def is_an_iterable_of(self, prototype):
        
        for element in self._subject:
            self._run(unittest_case.assertIsInstance, (element, prototype))
        if isinstance(self._subject, Mapping):
            return MappingInspector(self._subject)
1215698
def is_iterable(etype) -> bool:
    
    return type(etype) is GenericMeta and issubclass(etype.__extra__, Iterable)
1077697
def does_not_contain(self, element):
        
        self._run(unittest_case.assertNotIn, (element, self._subject))
        return ChainInspector(self._subject)
231614
def get_objects(self, subject, predicate):
        
        for statement in self.spo_search(subject=subject, predicate=predicate):
            yield str(statement[2])
928808
def associations(self, subject, object=None):
        
        if object is None:
            if self.associations_by_subj is not None:
                return self.associations_by_subj[subject]
            else:
                return []
        else:
            if self.associations_by_subj_obj is not None:
                return self.associations_by_subj_obj[(subject,object)]
            else:
                return []
181558
def wrap_iterable(obj):
    
    was_scalar = not isiterable(obj)
    wrapped_obj = [obj] if was_scalar else obj
    return wrapped_obj, was_scalar
1160454
def iscontainer(*items):
    
    return all(isinstance(i, Iterable) and not isinstance(i, basestring)
               for i in items)
1273911
def _parse_subject(subject):
    '''
    
    '''
    ret = {}
    nids = []
    for nid_name, nid_num in six.iteritems(subject.nid):
        if nid_num in nids:
            continue
        try:
            val = getattr(subject, nid_name)
            if val:
                ret[nid_name] = val
                nids.append(nid_num)
        except TypeError as err:
            log.debug("Missing attribute '%s'. Error: %s", nid_name, err)

    return ret
410379
def is_not_in(self, iterable):
        
        self._run(unittest_case.assertNotIn, (self._subject, iterable))
        return ChainInspector(self._subject)
611002
def object_isinstance(node, class_or_seq, context=None):
    
    obj_type = object_type(node, context)
    if obj_type is util.Uninferable:
        return util.Uninferable
    return _object_type_is_subclass(obj_type, class_or_seq, context=context)
994050
def get_subjects_for_object(object=None,
                            subject_category=None,
                            subject_taxon=None,
                            relation=None,
                            **kwargs):
    
    searchresult = search_associations(object=object,
                                       fetch_subjects=True,
                                       rows=0,
                                       subject_category=subject_category,
                                       subject_taxon=subject_taxon,
                                       relation=relation,
                                       **kwargs
    )
    subjs = searchresult['subjects']
    return subjs
950956
def _set_subject(self, subject):
        
        # if not subject:
        #     self.subject =
        def test_uri(value):
            """ test to see if the value is a uri or bnode

            Returns: Uri or Bnode """
            # .__wrapped__
            if not isinstance(value, (Uri, BlankNode)):
                try:
                    if value.startswith("_:"):
                        return BlankNode(value)
                    else:
                        return Uri(value)
                except:
                    return BlankNode()
            else:
                return value

        if isinstance(subject, dict):
            self.subject = test_uri(subject['s'])
            if isinstance(subject['o'], list):
                for item in subject['o']:
                    self.add_property(subject['p'],
                                      item)
            else:
                self.add_property(subject['p'],
                                  subject['o'])
        else:
            self.subject = test_uri(subject)
190637
def []=(key, value)
      characteristics[key] = Curation.new value, subject.class.characterization[key]
    end
934
def iterclass(cls):
    
    for field in dir(cls):
        if hasattr(cls, field):
            value = getattr(cls, field)
            yield field, value
331830
def prototype(self, name, argtypes, restype=None):
        """"""
        function = self.function(name)
        function.argtypes = argtypes
        if restype:
            function.restype = restype
226802
static boolean isNodeReference(Object v) {
        // Note: A value is a subject reference if all of these hold true:
        // 1. It is an Object.
        // 2. It has a single key: @id.
        return (v instanceof Map && ((Map<String, Object>) v).size() == 1
                && ((Map<String, Object>) v).containsKey("@id"));
    }
1161186
def _is_non_string_iterable(value):
    """"""
    if isinstance(value, str):
        return False
    if hasattr(value, '__iter__'):
        return True
    if isinstance(value, collections.abc.Sequence):
        return True
    return False