code: def test_otsu_edge_case():
      # This is an edge case that causes OTSU to appear to misbehave
      # Pixel [1, 1] may take a value of of 41 or 81. Both should be considered
      # valid. The value will change depending on the particular implementation
      # of OTSU.
      # To better understand, see
      # https://mybinder.org/v2/gist/hmaarrfk/4afae1cfded1d78e44c9e4f58285d552/master
  
      footprint = np.array(
          [[0, 1, 0], [1, 1, 1], [0, 1, 0]], dtype=np.uint8
      )
  
      img = np.array(
          [[0, 41, 0], [30, 81, 106], [0, 147, 0]], dtype=np.uint8
      )
  
      result = rank.otsu(img, footprint)
      assert result[1, 1] in [41, 81]
  
      img = np.array(
          [[0, 214, 0], [229, 104, 141], [0, 172, 0]], dtype=np.uint8
      )
      result = rank.otsu(img, footprint)
      assert result[1, 1] in [141, 172]
  
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 1 for calling a global function with example usage: test_otsu_edge_case() without return types