human
Solve the following python programming problem given the following code:
@contextmanager
def capture_reset_password_requests(reset_password_sent_at=None):
assistant
#Here is the Python code you requested.

    """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
    """
    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)