def METHOD_NAME(user, password):
    """
    Verify that the user's password is compliant with password policy rules and determine what should be done
    if it is not.
    Raises NonCompliantPasswordException when the password is found to be non-compliant and the compliance deadline
    for the user has been reached. In this case, login should be prevented.
    Raises NonCompliantPasswordWarning when the password is found to be non-compliant and the compliance deadline for
    the user is in the future.
    Returns None when the password is found to be compliant, or when no deadline for compliance has been set for the
    user.
    Important: This method should only be called AFTER the user has been authenticated.
    """
    is_compliant = _check_user_compliance(user, password)
    if is_compliant:
        return
    deadline = _get_compliance_deadline_for_user(user)
    if deadline is None:
        return
    now = datetime.now(pytz.UTC)
    if now >= deadline:  # lint-amnesty, pylint: disable=no-else-raise
        raise NonCompliantPasswordException(
            HTML(_(
                '{strong_tag_open}We recently changed our password requirements{strong_tag_close}{break_line_tag}'
                'Your current password does not meet the new security requirements. We just sent a password-reset '
                'message to the email address associated with this account. Thank you for helping us keep your data '
                'safe.'
            )).format(
                strong_tag_open=HTML('<strong>'),
                strong_tag_close=HTML('</strong>'),
                break_line_tag=HTML('<br/>'),
            )
        )
    else:
        raise NonCompliantPasswordWarning(
            HTML(_(
                '{strong_tag_open}Required Action: Please update your password{strong_tag_close}{break_line_tag}'
                'As of {deadline}, {platform_name} will require all learners to have complex passwords. Your current '
                'password does not meet these requirements. To reset your password, go to to '
                '{anchor_tag_open}Account Settings{anchor_tag_close}.'
            )).format(
                strong_tag_open=HTML('<strong>'),
                strong_tag_close=HTML('</strong>'),
                break_line_tag=HTML('<br/>'),
                platform_name=settings.PLATFORM_NAME,
                deadline=strftime_localized(deadline, DEFAULT_SHORT_DATE_FORMAT),
                anchor_tag_open=HTML('<a href="{account_settings_url}">').format(
                    account_settings_url=settings.LMS_ROOT_URL + "/account/settings"
                ),
                anchor_tag_close=HTML('</a>')
            )
        )