code: def test_pnm(setup_library, tmp_path):
      fnamebase = str(tmp_path / "test")
  
      for useAscii in (True, False):
          for crop in (0, 1, 2):
              for colors in (0, 1, 3):
                  fname = fnamebase
                  fname += "%i.%i.%i.ppm" % (useAscii, crop, colors)
                  rim = get_ref_im(colors, crop, isfloat=False)
                  iio.imsave(
                      fname, rim, use_ascii=useAscii, format="PPM-FI"
                  )
                  im = iio.imread(fname, format="PPM-FI")
                  assert_close(rim, im, 0.1)  # lossless
  
                  # Parameter fail
                  raises(
                      TypeError,
                      iio.imread,
                      fname,
                      notavalidkwarg=True,
                      format="PPM-FI",
                  )
                  raises(
                      TypeError,
                      iio.imsave,
                      fname,
                      im,
                      notavalidk=True,
                      format="PPM-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 20 for calling a global function with example usage: test_pnm(setup_library, tmp_path) without return types