code: def test_compression(tmp_path):
      img = np.ones((128, 128))
  
      with warnings.catch_warnings():
          warnings.simplefilter("ignore")
          iio.imwrite(
              tmp_path / "test.tiff", img, metadata={"compress": 5}
          )
  
      with tifffile.TiffFile(tmp_path / "test.tiff") as file:
          # this should be tifffile.COMPRESSION.ADOBE_DEFLATE
          # but that isn't supported by tifffile on python 3.7
          assert file.pages[0].compression == 8
          print("")
  
      iio.imwrite(
          tmp_path / "test.tiff", img, metadata={"compression": "zlib"}
      )
      with tifffile.TiffFile(tmp_path / "test.tiff") as file:
          # this should be tifffile.COMPRESSION.ADOBE_DEFLATE
          # but that isn't supported by tifffile on python 3.7
          assert file.pages[0].compression == 8
          print("")
  
      iio.imwrite(
          tmp_path / "test.tiff",
          img,
      )
      with tifffile.TiffFile(tmp_path / "test.tiff") as file:
          # this should be tifffile.COMPRESSION.NONE
          # but that isn't supported by tifffile on python 3.7
          assert file.pages[0].compression == 1
  
imports: import datetime
  import io
  import warnings
  from copy import deepcopy
  import numpy
  import pytest
  from conftest import deprecated_test
  import imageio.v2
  import imageio.v3
  from imageio.config import known_extensions, known_plugins
label_desc: Use image node_id 16 for calling a global function with example usage: test_compression(tmp_path) without return types