human
I wrote the below code

    global SERVER, PORTAL
    processes = Queue.Queue()
    def server_waiter(queue):
        try:
            rc = Popen(server_argv, env=getenv()).wait()
        except Exception as e:
            print(PROCESS_ERROR.format(component='Server', traceback=e))
            return
        queue.put(('server_stopped', rc))
    def portal_waiter(queue):
        try:
            rc = Popen(portal_argv, env=getenv()).wait()
        except Exception as e:
            print(PROCESS_ERROR.format(component='Portal', traceback=e))
            return
        queue.put(('portal_stopped', rc))
    if portal_argv:
        try:
            if ((not doexit) and (get_restart_mode(PORTAL_RESTART) == 'True')):
                PORTAL = thread.start_new_thread(portal_waiter, (processes,))
            else:
                PORTAL = Popen(portal_argv, env=getenv())
        except IOError as e:
            print(PROCESS_IOERROR.format(component='Portal', traceback=e))
            return
    try:
        if server_argv:
            if doexit:
                SERVER = Popen(server_argv, env=getenv())
            else:
                SERVER = thread.start_new_thread(server_waiter, (processes,))
    except IOError as e:
        print(PROCESS_IOERROR.format(component='Server', traceback=e))
        return
    if doexit:
        return
    while True:
        from twisted.internet.error import ReactorNotRunning
        try:
            try:
                (message, rc) = processes.get()
            except KeyboardInterrupt:
                break
            if ((message == 'server_stopped') and (int(rc) == 0) and (get_restart_mode(SERVER_RESTART) in ('True', 'reload', 'reset'))):
                print(PROCESS_RESTART.format(component='Server'))
                SERVER = thread.start_new_thread(server_waiter, (processes,))
                continue
            if ((message == 'portal_stopped') and (int(rc) == 0) and (get_restart_mode(PORTAL_RESTART) == 'True')):
                print(PROCESS_RESTART.format(component='Portal'))
              ...

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def start_services(server_argv, portal_argv, doexit=False):