docstr: Equivalent to _spawn_upload_sync, but uses the async event loop instead of a thread, and requires `event.save_fn_async`.
  
  Raises:
      AssertionError: if `event.save_fn_async` is None.
docstr_tok: ["Equivalent","to","_spawn_upload_sync",",","but","uses","the","async","event","loop","instead","of","a","thread",",","and","requires","`","event.save_fn_async","`",".","Raises",":","AssertionError",":","if","`","event.save_fn_async","`","is","None","."]
code: def _spawn_upload_async(
      self,
      event: RequestUpload,
      async_executor: AsyncExecutor,
  ) -> None:
      """Equivalent to _spawn_upload_sync, but uses the async event loop instead of a thread, and requires `event.save_fn_async`.
  
      Raises:
          AssertionError: if `event.save_fn_async` is None.
      """
      assert event.save_fn_async is not None
  
      self._running_jobs[event.save_name] = event
  
      async def run_and_notify() -> None:
          try:
              await self._do_upload_async(event)
          finally:
              self._event_queue.put(
                  EventJobDone(event, exc=sys.exc_info()[1])
              )
  
      async_executor.submit(run_and_notify())
  
imports: import asyncio
  import concurrent.futures
  import logging
  import queue
  import sys
  import threading
  from typing import TYPE_CHECKING, Awaitable, Callable, MutableMapping, MutableSequence, MutableSet, NamedTuple, Optional, Union
  from wandb.errors.term import termerror
  from wandb.filesync import upload_job
  from wandb.sdk.lib.paths import LogicalPath
label_desc: Use image node_id 6 for calling the StepUpload obj's underlying member method code with example usage: obj._spawn_upload_async(event, async_executor) without return types