<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wait_for_and_dismiss_alert(driver, timeout=settings.LARGE_TIMEOUT):
 """ Wait for and dismiss an alert. Returns the text from the alert. @Params driver - the webdriver object (required) timeout - the time to wait for the alert in seconds """

    alert = wait_for_and_switch_to_alert(driver, timeout)
    alert_text = alert.text
    alert.dismiss()
    return alert_text