code: def __init__(
      self,
      tokenizer: "AutoTokenizer",
      batch_size: int,
      skip_prompt: bool = False,
      timeout: Optional[float] = None,
      **decode_kwargs,
  ):
      self.batch_size = batch_size
      self.streamers = [
          TextIteratorStreamer(
              tokenizer, skip_prompt, timeout, **decode_kwargs
          )
          for _ in range(batch_size)
      ]
      self.streamer_iterators = [
          iter(streamer) for streamer in self.streamers
      ]
  
file_path: serve/ts/handler_utils/hf_batch_streamer.py
imports: from typing import Optional
  from transformers import AutoTokenizer
  from transformers.generation.streamers import BaseStreamer, TextIteratorStreamer
label_desc: Use image node_id 1 to create a new TextIteratorStreamerBatch object from inherited base classes: BaseStreamer with example: obj = TextIteratorStreamerBatch(tokenizer, batch_size, skip_prompt, timeout)