def METHOD_NAME(failure, proto, username, password):
    """
    Errback invoked when authentication fails.
    If it failed because no SASL mechanisms match, offer the user the choice
    of logging in insecurely.
    If you are trying to connect to your Gmail account, you will be here!
    """
    failure.trap(imap4.NoSupportedAuthentication)
    return proto.prompt(
        "No secure authentication available. Login insecurely? (y/N) "
    ).addCallback(cbInsecureLogin, proto, username, password)