code: def test_gif_write(test_images, tmp_path):
      frames_expected = iio.imread(
          test_images / "newtonscradle.gif",
          plugin="pyav",
          format="gray",
      )
  
      # touch the codepath that creates a video from a list of frames
      frame_list = list(frames_expected)
  
      iio.imwrite(
          tmp_path / "test.gif",
          frame_list,
          plugin="pyav",
          codec="gif",
          out_pixel_format="gray",
          in_pixel_format="gray",
      )
      frames_actual = iio.imread(
          tmp_path / "test.gif", plugin="pyav", format="gray"
      )
      assert np.allclose(frames_actual, frames_expected)
  
imports: import io
  import warnings
  from contextlib import ExitStack
  from pathlib import Path
  import numpy
  import pytest
  from conftest import IS_PYPY
  import imageio.v3
  from av.video.format import names
  from imageio.plugins.pyav import _format_to_dtype
label_desc: Use image node_id 12 for calling a global function with example usage: test_gif_write(test_images, tmp_path) without return types