code: def test_imread_2bit():
      # blocks2bit.png is a 12x12 grayscale image with bit depth 2.
      # The pattern is 4 square subblocks of size 6x6.  Upper left
      # is all 0, upper right is all 1, lower left is all 2, lower
      # right is all 3.
      # When scaled up to 8 bits, the values become [0, 85, 170, 255].
      filename = os.path.join(datapath, "data", "blocks2bit.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)
      expected = np.zeros((12, 12), dtype=np.uint8)
      expected[:6, 6:] = 85
      expected[6:, :6] = 170
      expected[6:, 6:] = 255
      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 5 for calling a global function with example usage: test_imread_2bit() without return types