class_docstr: A base async request/response streamer.
docstr: :param request_handler: The callable responsible for handling the request. It should handle a request as input and return a Future to be awaited
  :param result_handler: The callable responsible for handling the response.
  :param end_of_iter_handler: Optional callable to handle the end of iteration if some special action needs to be taken.
  :param prefetch: How many Requests are processed from the Client at the same time.
  :param iterate_sync_in_thread: if True, blocking iterators will call __next__ in a Thread.
  :param logger: Optional logger that can be used for logging
  :param logger_kwargs: Extra keyword arguments that may be passed to the internal logger constructor if none is provided
code: def __init__(
      self,
      request_handler: Callable[
          ["Request"],
          Tuple[Awaitable["Request"], Optional[Awaitable["Request"]]],
      ],
      result_handler: Callable[["Request"], Optional["Request"]],
      prefetch: int = 0,
      iterate_sync_in_thread: bool = True,
      end_of_iter_handler: Optional[Callable[[], None]] = None,
      logger: Optional["JinaLogger"] = None,
      **logger_kwargs,
  ):
      """
      :param request_handler: The callable responsible for handling the request. It should handle a request as input and return a Future to be awaited
      :param result_handler: The callable responsible for handling the response.
      :param end_of_iter_handler: Optional callable to handle the end of iteration if some special action needs to be taken.
      :param prefetch: How many Requests are processed from the Client at the same time.
      :param iterate_sync_in_thread: if True, blocking iterators will call __next__ in a Thread.
      :param logger: Optional logger that can be used for logging
      :param logger_kwargs: Extra keyword arguments that may be passed to the internal logger constructor if none is provided
  
      """
      self.logger = logger or JinaLogger(
          self.__class__.__name__, **logger_kwargs
      )
      self._prefetch = prefetch
      self._request_handler = request_handler
      self._result_handler = result_handler
      self._end_of_iter_handler = end_of_iter_handler
      self._iterate_sync_in_thread = iterate_sync_in_thread
      self.total_num_floating_tasks_alive = 0
  
file_path: jina/jina/serve/stream/__init__.py
imports: import asyncio
  from typing import TYPE_CHECKING, AsyncIterator, Awaitable, Callable, Iterator, Optional, Tuple, Type, Union
  from jina.excepts import InternalNetworkError
  from jina.logging.logger import JinaLogger
  from jina.serve.stream.helper import AsyncRequestsIterator, _RequestsCounter
  from jina.types.request.data import DataRequest
  from jina._docarray import DocumentArray
  from jina.types.request.data import Response
label_desc: Use image node_id 1 to create a new RequestStreamer object  with example: obj = RequestStreamer(request_handler, result_handler, prefetch, iterate_sync_in_thread, end_of_iter_handler, logger)