def related_objects(self):
        """
        Generator that yields dictionaries of all models that have this
        EasyInstance's model as a ForeignKey or ManyToManyField, along with
        lists of related objects.
        """
        for rel_object in \
            self.model.model._meta.get_all_related_objects() +\
            self.model.model._meta.get_all_related_many_to_many_objects():
            if self.model.model_list not in rel_object.model:
                continue # Skip models that aren't in the model_list
            em = EasyModel(self.model.site, rel_object.model)
            try:
                rel_accessor = getattr(self.instance, rel_object.get_accessor_name())
            except ObjectDoesNotExist:
                continue               
            if rel_object.field.rel.multiple:
                object_list = [EasyInstance(em, i) for i in rel_accessor.all()]
            else: # for one-to-one fields
                object_list = [EasyInstance(em, rel_accessor)]
            yield {
                'model': em,
                'related_field': rel_object.field.verbose_name,
                'object_list': object_list,
                }
dataset/ETHPy150Open Alir3z4/django-databrowse/django_databrowse/datastructures.py/EasyInstance.related_objects/swapped operands of `not in`