code: def test_ico(setup_library, tmp_path):
      fnamebase = str(tmp_path / "test")
  
      for isfloat in (False, True):
          for crop in (0,):
              for colors in (1, 3, 4):
                  fname = fnamebase + "%i.%i.%i.ico" % (
                      isfloat,
                      crop,
                      colors,
                  )
                  rim = get_ref_im(colors, crop, isfloat)
                  rim = rim[:32, :32]  # ico needs nice size
                  iio.imsave(fname, rim, format="ICO-FI")
                  im = iio.imread(fname, format="ICO-FI")
                  mul = 255 if isfloat else 1
                  assert_close(rim * mul, im, 0.1)  # lossless
  
      # Meta data
      R = iio.read(fnamebase + "0.0.1.ico", format="ICO-FI")
      assert isinstance(R.get_meta_data(0), dict)
      assert isinstance(
          R.get_meta_data(None), dict
      )  # But this print warning
      R.close()
      writer = iio.save(fnamebase + "I.ico", format="ICO-FI")
      writer.set_meta_data({})
      writer.close()
  
      # Parameters. Note that with makealpha, RGBA images are read in incorrectly
      im = iio.imread(
          fnamebase + "0.0.1.ico", makealpha=True, format="ICO-FI"
      )
      assert im.ndim == 3 and im.shape[-1] == 4
  
      # Parameter fail
      raises(
          TypeError,
          iio.imread,
          fname,
          notavalidkwarg=True,
          format="ICO-FI",
      )
      raises(
          TypeError,
          iio.imsave,
          fnamebase + "1.ico",
          im,
          notavalidk=True,
          format="ICO-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 17 for calling a global function with example usage: test_ico(setup_library, tmp_path) without return types