class_docstr: Base class from which `.generate()` streamers should inherit.
class_docstr_tok: ["Base","class","from","which","`",".generate","(",")","`","streamers","should","inherit","."]
docstr: Function that is called by `.generate()` to signal the end of generation
docstr_tok: ["Function","that","is","called","by","`",".generate","(",")","`","to","signal","the","end","of","generation"]
code: def end(self):
      """Function that is called by `.generate()` to signal the end of generation"""
      raise NotImplementedError()
  
file_path: transformers/src/transformers/generation/streamers.py
imports: from queue import Queue
  from typing import TYPE_CHECKING, Optional
label_desc: Use image node_id 2 for calling the BaseStreamer obj's underlying member method code with example usage: obj.end() without return types