def METHOD_NAME(self, username, ip, device_cookie=None, device_cookie_name=None):
    limiter = self.get_limiter(app.config["AUTH_RATELIMIT_USER"], 'auth-user')
    is_rate_limited = self.is_subject_to_rate_limits(ip) and not limiter.test(device_cookie if device_cookie_name == username else username)
    if is_rate_limited:
        app.logger.warn(f'Authentication attempt from {ip} for {username} has been rate-limited.')
    return is_rate_limited