code: def write_gif_with_image_io(
      clip: Any, filename: str, fps: Optional[int] = None
  ) -> None:
      imageio = util.get_module(
          "imageio",
          required='wandb.Video requires imageio when passing raw data. Install with "pip install imageio"',
      )
  
      writer = imageio.save(
          filename,
          duration=1.0 / clip.fps,
          quantizer=0,
          palettesize=256,
          loop=0,
      )
  
      for frame in clip.iter_frames(fps=fps, dtype="uint8"):
          writer.append_data(frame)
  
      writer.close()
  
file_path: wandb/wandb/sdk/data_types/video.py
imports: import logging
  import os
  from io import BytesIO
  from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, Type, Union
  from wandb import util
  from wandb.sdk.lib import filesystem, runid
  from .None import _dtypes
  from ._private import MEDIA_TMP
  from .base_types.media import BatchableMedia
label_desc: Use image node_id 1 for calling a global function with example usage: write_gif_with_image_io(clip, filename, fps) without return types