def pre_save_moderation(self, sender, instance, **kwargs):
        model = instance.content_type.model_class()
        if instance.id or (model not in self._registry):
            return
        content_object = instance.content_object
        moderation_class = self._registry[model]
        if not moderation_class.allow(instance, content_object): # Comment will get deleted in post-save hook.
            instance.moderation_disallowed = True
            return
        if moderation_class.moderate(instance, content_object):
            instance.is_public = False
Apply any necessary pre-save moderation steps to new
dataset/ETHPy150Open jezdez-archive/django-comment-utils/comment_utils/moderation.py/Moderator.pre_save_moderation