human
I wrote the below code

    def call_editor(self, filename, line=0):
        if (line is None):
            line = 0
        cmd = template.format(filename=pipes.quote(filename), line=line)
        print ('>', cmd)
        if sys.platform.startswith('win'):
            cmd = shlex.split(cmd)
        proc = subprocess.Popen(cmd, shell=True)
        if (proc.wait() != 0):
            raise TryNext()
        if wait:
            py3compat.input('Press    Enter    when    done    editing:')
    get_ipython().set_hook('editor', call_editor)
    get_ipython().editor = template

What's a good function header?
assistant
#Here is Python program to print ('>', cmd)
.

def install_editor(template, wait=False):