code: def test_isolated_seeds():
      np.random.seed(0)
      a = np.random.random((7, 7))
      mask = -np.ones(a.shape)
      # This pixel is an isolated seed
      mask[1, 1] = 1
      # Unlabeled pixels
      mask[3:, 3:] = 0
      # Seeds connected to unlabeled pixels
      mask[4, 4] = 2
      mask[6, 6] = 1
  
      # Test that no error is raised, and that labels of isolated seeds are OK
      with expected_warnings(
          ["The probability range is outside|scipy.sparse.linalg.cg"]
      ):
          res = random_walker(a, mask)
      assert res[1, 1] == 1
      with expected_warnings(
          ["The probability range is outside|scipy.sparse.linalg.cg"]
      ):
          res = random_walker(a, mask, return_full_prob=True)
      assert res[0, 1, 1] == 1
      assert res[1, 1, 1] == 0
  
imports: import numpy
  from skimage._shared import testing
  from skimage._shared._warnings import expected_warnings
  from skimage._shared.testing import xfail, arch32
  from skimage.segmentation import random_walker
  from skimage.transform import resize
label_desc: Use image node_id 20 for calling a global function with example usage: test_isolated_seeds() without return types