code: def test_types(test_images, tmp_path):
      fname2 = tmp_path / "stent.out3.swf"
  
      for dtype in [
          np.uint8,
          np.uint16,
          np.uint32,
          np.uint64,
          np.int8,
          np.int16,
          np.int32,
          np.int64,
          np.float16,
          np.float32,
          np.float64,
      ]:
          for shape in [(100, 1), (100, 3)]:
              # Repeats an identity matrix, just for testing
              im1 = np.dstack(
                  (np.identity(shape[0], dtype=dtype),) * shape[1]
              )
              iio.mimsave(fname2, [im1], "swf")
              im2 = iio.mimread(fname2, "swf")[0]
              assert im2.shape == (100, 100, 4)
              assert im2.dtype == np.uint8
              if len(shape) == 3 and dtype == np.uint8:
                  assert (im1[:, :, 0] == im2[:, :, 0]).all()
  
file_path: imageio/tests/test_swf.py
imports: import numpy
  import pytest
  import imageio.v2
  import imageio.plugins
  from imageio import core
  from imageio.core import IS_PYPY
  from conftest import deprecated_test
label_desc: Use image node_id 7 for calling a global function with example usage: test_types(test_images, tmp_path) without return types