code: def test_compare_8bit_unsigned_vs_signed(self):
      # filters applied on 8-bit image or 16-bit image (having only real 8-bit
      # of dynamic) should be identical
  
      # Create signed int8 image that and convert it to uint8
      image = img_as_ubyte(data.camera())[::2, ::2]
      image[image > 127] = 0
      image_s = image.astype(np.int8)
      image_u = img_as_ubyte(image_s)
      assert_equal(image_u, img_as_ubyte(image_s))
  
      methods = [
          "autolevel",
          "equalize",
          "gradient",
          "maximum",
          "mean",
          "geometric_mean",
          "subtract_mean",
          "median",
          "minimum",
          "modal",
          "enhance_contrast",
          "pop",
          "threshold",
      ]
  
      for method in methods:
          func = getattr(rank, method)
          out_u = func(image_u, disk(3))
          with expected_warnings(["Possible precision loss"]):
              out_s = func(image_s, disk(3))
          assert_equal(out_u, out_s)
  
imports: import numpy
  import pytest
  from skimage import data, morphology, util
  from skimage._shared._warnings import expected_warnings
  from skimage._shared.testing import assert_allclose, assert_array_almost_equal, assert_equal, fetch, run_in_parallel
  from skimage.filters import rank
  from skimage.filters.rank import __all__
  from skimage.filters.rank import subtract_mean
  from skimage.morphology import ball, disk, gray
  from skimage.util import img_as_float, img_as_ubyte
label_desc: Use image node_id 17 for calling the TestRank obj's underlying member method code with example usage: obj.test_compare_8bit_unsigned_vs_signed() without return types