code: def check_fromimage(filename, irange, shape):
      fp = open(filename, "rb")
      with suppress_warnings() as sup:
          sup.filter(DeprecationWarning)
          img = misc.fromimage(PIL.Image.open(fp))
      fp.close()
      imin, imax = irange
      assert_equal(img.min(), imin)
      assert_equal(img.max(), imax)
      assert_equal(img.shape, 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 1 for calling a global function with example usage: check_fromimage(filename, irange, shape) without return types