Nesting function definitions like that is bad practice, since they aren't accessible only from the parent function, as you would expect.

You should move it outside of the `launch_editor_for_input()` function.