class_docstr: Class that for helping write the animated GIF file. This is based on
  code from images2gif.py (part of visvis). The version here is modified
  to allow streamed writing.
class_docstr_tok: ["Class","that","for","helping","write","the","animated","GIF","file",".","This","is","based","on","code","from","images2gif.py","(","part","of","visvis",")",".","The","version","here","is","modified","to","allow","streamed","writing","."]
code: def __init__(
      self,
      file,
      opt_subrectangle=True,
      opt_loop=0,
      opt_quantizer=0,
      opt_palette_size=256,
  ):
      self.fp = file
  
      self.opt_subrectangle = opt_subrectangle
      self.opt_loop = opt_loop
      self.opt_quantizer = opt_quantizer
      self.opt_palette_size = opt_palette_size
  
      self._previous_image = None  # as np array
      self._global_palette = None  # as bytes
      self._count = 0
  
      from PIL.GifImagePlugin import getdata
  
      self.getdata = getdata
  
file_path: imageio/imageio/plugins/pillowmulti.py
imports: import logging
  import numpy
  from .pillow_legacy import PillowFormat, image_as_uint, ndarray_to_pil
label_desc: Use image node_id 1 to create a new GifWriter object  with example: obj = GifWriter(file, opt_subrectangle, opt_loop, opt_quantizer, opt_palette_size)