code: def test_fromimage():
      # Test generator for parametric tests
      # Tuples in the list are (filename, (datamin, datamax), shape).
      files = [
          ("icon.png", (0, 255), (48, 48, 4)),
          ("icon_mono.png", (0, 255), (48, 48, 4)),
          ("icon_mono_flat.png", (0, 255), (48, 48, 3)),
      ]
      for fn, irange, shape in files:
          with suppress_warnings() as sup:
              sup.filter(DeprecationWarning)
              check_fromimage(
                  os.path.join(datapath, "data", fn), irange, shape
              )
  
imports: from __future__ import division, print_function, absolute_import
  import os.path
  import tempfile
  import shutil
  import numpy
  import glob
  import pytest
  from pytest import raises
  from numpy.testing import assert_equal, assert_allclose, assert_array_equal, assert_
  from scipy._lib._numpy_compat import suppress_warnings
  from scipy import misc
  from numpy.ma.testutils import assert_mask_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_fromimage() without return types