<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_and_quit(editor, location, force=False):
 """ Write file and quit. """

    write(editor, location, force=force)
    editor.application.exit()