<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def no_retry_on_failure(handler):
 """ AWS Lambda retries scheduled lambdas that don't execute succesfully. This detects this by storing requests IDs in memory and exiting early on duplicates. Since this is in memory, don't use it on very frequently scheduled lambdas. It logs a critical message then exits with a statusCode of 200 to avoid further retries. Usage:: {'statusCode': 500} Retry attempt on request id 1 detected. {'statusCode': 200} """

    seen_request_ids = set()

    @wraps(handler)
    def wrapper(event, context):
        if context.aws_request_id in seen_request_ids:
            logger.critical('Retry attempt on request id %s detected.',
                            context.aws_request_id)
            return {'statusCode': 200}
        seen_request_ids.add(context.aws_request_id)
        return handler(event, context)

    return wrapper