code: def realtime_comment_classifier(sender, instance, created, **kwargs):
      
      # Only classify if newly created.
      if created:
          moderator_settings = getattr(settings, 'MODERATOR', None)
          if moderator_settings:
              if 'REALTIME_CLASSIFICATION' in moderator_settings:
                  if not moderator_settings['REALTIME_CLASSIFICATION']:
                      return
  
          # Only classify if not a reply comment.
          if not getattr(instance, 'is_reply_comment', False):
              from moderator.utils import classify_comment
              classify_comment(instance)
docs: Classifies a comment after it has been created.
  
      This behaviour is configurable by the REALTIME_CLASSIFICATION MODERATOR,
      default behaviour is to classify(True).