code: def test_imread_4bit():
      # pattern4bit.png is a 12(h) x 31(w) grayscale image with bit depth 4.
      # The value in row j and column i is maximum(j, i) % 16.
      # When scaled up to 8 bits, the values become [0, 17, 34, ..., 255].
      filename = os.path.join(datapath, "data", "pattern4bit.png")
      with open(filename, "rb") as f:
          with suppress_warnings() as sup:
              sup.filter(DeprecationWarning)
              im = misc.imread(f)
      assert_equal(im.dtype, np.uint8)
      j, i = np.meshgrid(np.arange(12), np.arange(31), indexing="ij")
      expected = 17 * (np.maximum(j, i) % 16).astype(np.uint8)
      assert_equal(im, expected)
  
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 6 for calling a global function with example usage: test_imread_4bit() without return types