def get_modal_alert(browser):
 WebDriverWait(browser, 6).until(EC.alert_is_present())
 return browser.switch_to.alert

def get_modal_alert ( browser ) : WebDriverWait ( browser , 6 ) . until ( EC . alert_is_present ( ) ) return browser . switch_to . alert
returns instance of modal alert box shown in browser after waiting for 6 seconds .