<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_comment_will_be_posted(sender, comment, request, **kwargs):
 """ Make sure both the Ajax and regular comments are checked for moderation. This signal is also used to link moderators to the comment posting. """

    content_object = comment.content_object
    moderator = moderation.get_model_moderator(content_object.__class__)
    if moderator and comment.__class__ is not CommentModel:
        # Help with some hard to diagnose problems. The default Django moderator connects
        # to the configured comment model. When this model differs from the signal sender,
        # the the form stores a different model then COMMENTS_APP provides.
        moderator = None
        logger.warning(
            "Comment of type '%s' was not moderated by '%s', "
            "because the parent '%s' has a moderator installed for '%s' instead",
            comment.__class__.__name__, moderator.__class__.__name__,
            content_object.__class__.__name__, CommentModel.__name__
        )

    if moderator is None:
        logger.info(
            "Using default moderator for comment '%s' on parent '%s'",
            comment.__class__.__name__, content_object.__class__.__name__
        )
        _run_default_moderator(comment, content_object, request)