code: def test_imread_1bit():
      # box1.png is a 48x48 grayscale image with bit depth 1.
      # The border pixels are 1 and the rest are 0.
      filename = os.path.join(datapath, "data", "box1.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((48, 48), dtype=np.uint8)
      # When scaled up from 1 bit to 8 bits, 1 becomes 255.
      expected[:, 0] = 255
      expected[:, -1] = 255
      expected[0, :] = 255
      expected[-1, :] = 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 4 for calling a global function with example usage: test_imread_1bit() without return types