def post_message(driver, message, msg_dur, style="<STR_LIT:info>"):
if not msg_dur:<EOL><INDENT>msg_dur = settings.DEFAULT_MESSAGE_DURATION<EOL><DEDENT>msg_dur = float(msg_dur)<EOL>message = re.escape(message)<EOL>message = escape_quotes_if_needed(message)<EOL>messenger_script = ('''<STR_LIT>'''<EOL>'''<STR_LIT>'''<EOL>% (message, style, msg_dur))<EOL>try:<EOL><INDENT>driver.execute_script(messenger_script)<EOL><DEDENT>except Exception:<EOL><INDENT>activate_messenger(driver)<EOL>set_messenger_theme(driver)<EOL>try:<EOL><INDENT>driver.execute_script(messenger_script)<EOL><DEDENT>except Exception:<EOL><INDENT>time.sleep(<NUM_LIT>)<EOL>activate_messenger(driver)<EOL>time.sleep(<NUM_LIT>)<EOL>set_messenger_theme(driver)<EOL>time.sleep(<NUM_LIT:0.5>)<EOL>driver.execute_script(messenger_script)<EOL><DEDENT><DEDENT>
A helper method to post a message on the screen with Messenger.
        (Should only be called from post_message() in base_case.py)