def _find_serializer(self, obj):
        obj_type = type(obj)

        with self._lock:
            if obj_type not in self._cache:
                info = None
                for name, serializer in reversed(self._types):
                    if serializer.isinstance(obj):
                        info = name, serializer
                        break
                self._cache[obj_type] = info

        info = self._cache[obj_type]
        if info is None:
            raise UnregisteredType(obj_type)

        return info
dataset/ETHPy150Open abusesa/abusehelper/abusehelper/core/serialize.py/Serializer._find_serializer/original