def signal_handler(screen):
if screen:<EOL><INDENT>screen.clear()<EOL>screen.refresh()<EOL>curses.nocbreak()<EOL>screen.keypad(<NUM_LIT:0>)<EOL>curses.echo()<EOL>curses.endwin()<EOL><DEDENT>print("<STR_LIT>")<EOL>sys.exit(<NUM_LIT:0>)<EOL>
This function is bound to the SIGINT signal (like ctrl+c) to graciously
    exit the program and reset the curses options.