code: def test_chan_vese_flat_level_set(dtype):
      # because the algorithm evolves the level set around the
      # zero-level, it the level-set has no zero level, the algorithm
      # will not produce results in theory. However, since a continuous
      # approximation of the delta function is used, the algorithm
      # still affects the entirety of the level-set. Therefore with
      # infinite time, the segmentation will still converge.
      img = np.zeros((10, 10), dtype=dtype)
      img[3:6, 3:6] = 1
      ls = np.full((10, 10), 1000, dtype=dtype)
      result = chan_vese(img, mu=0.0, tol=1e-3, init_level_set=ls)
      assert_array_equal(result.astype(float), np.ones((10, 10)))
      result = chan_vese(img, mu=0.0, tol=1e-3, init_level_set=-ls)
      assert_array_equal(result.astype(float), np.zeros((10, 10)))
  
file_path: scikit-image/skimage/segmentation/tests/test_chan_vese.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from skimage._shared.utils import _supported_float_type
  from skimage.segmentation import chan_vese
label_desc: Use image node_id 1 for calling a global function with example usage: test_chan_vese_flat_level_set(dtype) without return types