class_docstr: A thread that batches requests to our file prepare API.
  
  Any number of threads may call prepare_async() in parallel. The PrepareBatcher thread
  will batch requests up and send them all to the backend at once.
code: def __init__(
      self,
      api: "Api",
      batch_time: float,
      inter_event_time: float,
      max_batch_size: int,
      request_queue: Optional["queue.Queue[Request]"] = None,
  ) -> None:
      self._api = api
      self._inter_event_time = inter_event_time
      self._batch_time = batch_time
      self._max_batch_size = max_batch_size
      self._request_queue: queue.Queue[Request] = (
          request_queue or queue.Queue()
      )
      self._thread = threading.Thread(target=self._thread_body)
      self._thread.daemon = True
  
imports: import asyncio
  import functools
  import queue
  import threading
  import time
  from typing import TYPE_CHECKING, Callable, Dict, List, Mapping, NamedTuple, Optional, Sequence, Tuple, Union
label_desc: Use image node_id 1 to create a new StepPrepare object  with example: obj = StepPrepare(api, batch_time, inter_event_time, max_batch_size, request_queue)