def matches_subject_class(self, subject):
        for sub in self.subjects:
            if inspect.isclass(sub):
                if inspect.isclass(subject):
                    return issubclass(subject, sub)
                else:
                    return isinstance(subject, sub)
            elif isinstance(sub, string_types):
                if inspect.isclass(subject):
                    return subject.__name__ == sub
                else:
                    return subject.__class__.__name__ == sub
        return False
subject can be either Classes or instances of classes
dataset/ETHPy150Open bouncer-app/bouncer/bouncer/models.py/Rule.matches_subject_class