code: def test_isolated_pixel(rng):
      data = rng.random((3, 3))
  
      # Build the following labels with an isolated seed
      # in the bottom-right corner:
      # array([[ 0., -1., -1.],
      #        [-1., -1., -1.],
      #        [-1., -1.,  1.]])
      labels = -np.ones((3, 3))
      # Point
      labels[0, 0] = 0
      # Make a seed
      labels[2, 2] = 1
      # The expected result is:
      # array([[ 0., -1., -1.],
      #        [-1., -1., -1.],
      #        [-1., -1.,  1.]])
      expected = np.array(
          [[0.0, -1.0, -1.0], [-1.0, -1.0, -1.0], [-1.0, -1.0, 1.0]]
      )
      np.testing.assert_array_equal(
          expected, random_walker(data, labels)
      )
  
file_path: nilearn/nilearn/_utils/tests/test_segmentation.py
imports: import numpy
  import pytest
  from nilearn._utils.segmentation import random_walker
label_desc: Use image node_id 2 for calling a global function with example usage: test_isolated_pixel(rng) without return types