docs: 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::
  
        >>> import logging, sys
        >>> from lambda_decorators import no_retry_on_failure, logger
        >>> logger.addHandler(logging.StreamHandler(stream=sys.stdout))
        >>> @no_retry_on_failure
        ... def scheduled_handler(event, context):
        ...     return {'statusCode': 500}
        >>> class Context:
        ...     aws_request_id = 1
        >>> scheduled_handler({}, Context())
        {'statusCode': 500}
        >>> scheduled_handler({}, Context())
        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