class_docstr: Parallel file upload class.
  
  This manages uploading multiple files in parallel. It will restart a given file's
  upload job if it receives a notification that that file has been modified. The
  finish() method will block until all events have been processed and all uploads are
  complete.
class_docstr_tok: ["Parallel","file","upload","class",".","This","manages","uploading","multiple","files","in","parallel",".","It","will","restart","a","given","file's","upload","job","if","it","receives","a","notification","that","that","file","has","been","modified",".","The","finish","(",")","method","will","block","until","all","events","have","been","processed","and","all","uploads","are","complete","."]
code: def __init__(
      self,
      api: "internal_api.Api",
      file_stream: "file_stream.FileStreamApi",
      settings: Optional["SettingsStatic"] = None,
  ) -> None:
      self._api = api
  
      self._tempdir = tempfile.TemporaryDirectory("wandb")
  
      self._stats = stats.Stats()
  
      self._incoming_queue: queue.Queue[
          step_checksum.Event
      ] = queue.Queue()
      self._event_queue: queue.Queue[step_upload.Event] = queue.Queue()
  
      self._step_checksum = step_checksum.StepChecksum(
          self._api,
          self._tempdir,
          self._incoming_queue,
          self._event_queue,
          self._stats,
      )
      self._step_checksum.start()
  
      self._step_upload = step_upload.StepUpload(
          self._api,
          self._stats,
          self._event_queue,
          self.MAX_UPLOAD_JOBS,
          file_stream=file_stream,
          settings=settings,
      )
      self._step_upload.start()
  
      self._stats_thread_stop = threading.Event()
      if os.environ.get("WANDB_DEBUG"):
          # debug thread to monitor and report file pusher stats
          self._stats_thread = threading.Thread(
              target=self._file_pusher_stats,
              daemon=True,
              name="FPStatsThread",
          )
          self._stats_thread.start()
  
imports: import concurrent.futures
  import logging
  import os
  import queue
  import tempfile
  import threading
  import time
  from typing import TYPE_CHECKING, Optional, Tuple
  import wandb
  import wandb.util
  from wandb.filesync import stats, step_checksum, step_upload
  from wandb.sdk.lib.paths import LogicalPath
label_desc: Use image node_id 1 to create a new FilePusher object  with example: obj = FilePusher(api, file_stream, settings)