human
I wrote the below code

    def _start_new_thread(target, args, kw=None):
        if (kw is None):
            kw = {}
        request_id = remote_api_stub.RemoteStub._GetRequestId()
        request = request_state.get_request_state(request_id)
        def _run():
            try:
                remote_api_stub.RemoteStub._SetRequestId(request_id)
                request.start_thread()
                target(*args, **kw)
            finally:
                request_environment.current_request.Clear()
                request.end_thread()
        return base_start_new_thread(_run, ())
    return _start_new_thread

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

def _make_request_id_aware_start_new_thread(base_start_new_thread):