code: def test_pil():
      import mahotas as mh
      import numpy as np
  
      try:
          from mahotas.io import pil
      except ImportError:
          pytest.skip("Missing PIL. Skipping PIL-dependent tests")
      lena = mh.demos.load("lena")
      filename = path.join(
          path.dirname(__file__), "..", "demos", "data", "lena.jpg"
      )
      assert np.all(pil.imread(filename) == lena)
      assert pil.imread(filename, as_grey=1).ndim == 2
  
file_path: mahotas/mahotas/tests/test_io.py
imports: import numpy
  from mahotas.io import error_imread, error_imsave
  from os import path
  import mahotas
  import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: test_pil() without return types