<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def expect_no_raises(message=None, extras=None):
 """Expects no exception is raised in a context. If the expectation is not met, the test is marked as fail after its execution finishes. A default message is added to the exception `details`. Args: message: string, custom message to add to exception's `details`. extras: An optional field for extra information to be included in test result. """

    try:
        yield
    except Exception as e:
        e_record = records.ExceptionRecord(e)
        if extras:
            e_record.extras = extras
        msg = message or 'Got an unexpected exception'
        details = '%s: %s' % (msg, e_record.details)
        logging.exception(details)
        e_record.details = details
        recorder.add_error(e_record)