code: def capture_reset_password_requests(reset_password_sent_at=None):
      
      reset_requests = []
  
      def _on(app, **data):
          reset_requests.append(data)
  
      reset_password_instructions_sent.connect(_on)
  
      try:
          yield reset_requests
      finally:
          reset_password_instructions_sent.disconnect(_on)
docs: Testing utility for capturing password reset requests.
  
      :param reset_password_sent_at: An optional datetime object to set the
                                     user's `reset_password_sent_at` to