code: def threadProfileCode(func, *args, **kwargs):
      'Toplevel thread profile wrapper.'
      with ThreadProfiler(threading.current_thread()) as prof:
          try:
              prof.thread.status = threadProfileCode.__wrapped__(func, *args, **kwargs)
          except EscapeException as e:
              prof.thread.status = f threadProfileCode(func, *args, **kwargs):
      'Toplevel thread profile wrapper.'
      with ThreadProfiler(threading.current_thread()) as prof:
          try:
              prof.thread.status = threadProfileCode.__wrapped__(func, *args, **kwargs)
          except EscapeException as e:
              prof.thread.status = e
docs: Toplevel thread profile wrapper.