class_docstr: Runs async file uploads in a background thread.
code: def __init__(
      self,
      pool: concurrent.futures.ThreadPoolExecutor,
      concurrency_limit: Optional[int],
  ) -> None:
      self.loop = asyncio.new_event_loop()
      self.loop.set_default_executor(pool)
      self.loop_thread = threading.Thread(
          target=self.loop.run_forever,
          daemon=True,
          name="wandb-upload-async",
      )
  
      self.concurrency_limiter = asyncio.Semaphore(
          value=concurrency_limit or 128,
          # Before Python 3.10: if we don't set `loop=loop`,
          #   then the Semaphore will bind to the wrong event loop,
          #   causing errors when a coroutine tries to wait for it;
          #   see https://pastebin.com/XcrS9suX .
          # After 3.10: the `loop` argument doesn't exist.
          # So we need to only conditionally pass in `loop`.
          **(
              {} if sys.version_info >= (3, 10) else {"loop": self.loop}
          ),
      )
  
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 1 to create a new AsyncExecutor object  with example: obj = AsyncExecutor(pool, concurrency_limit)