code: def test_gif(setup_library, tmp_path):
      fnamebase = str(tmp_path / "test")
  
      # The not-animated gif
  
      for isfloat in (False, True):
          for crop in (0, 1, 2):
              for colors in (0, 3, 4):
                  if colors > 1 and sys.platform.startswith("darwin"):
                      continue  # quantize fails, see also png
                  fname = fnamebase + "%i.%i.%i.gif" % (
                      isfloat,
                      crop,
                      colors,
                  )
                  rim = get_ref_im(colors, crop, isfloat)
                  iio.imsave(fname, rim, format="GIF-FI")
                  im = iio.imread(fname, format="GIF-FI")
                  mul = 255 if isfloat else 1
                  if colors in (0, 1):
                      im = im[:, :, 0]
                  else:
                      im = im[:, :, :3]
                      rim = rim[:, :, :3]
                  assert_close(rim * mul, im, 1.1)  # lossless
  
      # Parameter fail
      raises(
          TypeError,
          iio.imread,
          fname,
          notavalidkwarg=True,
          format="GIF-FI",
      )
      raises(
          TypeError,
          iio.imsave,
          fnamebase + "1.gif",
          im,
          notavalidk=True,
          format="GIF-FI",
      )
  
imports: import os
  import shutil
  import sys
  import platform
  import warnings
  import fsspec
  import imageio.plugins
  import imageio.v3
  import imageio.v2
  import numpy
  import pytest
  from imageio import core
  from imageio.core import IS_PYPY
  from pytest import raises
  from conftest import deprecated_test
label_desc: Use image node_id 15 for calling a global function with example usage: test_gif(setup_library, tmp_path) without return types