code: def test_central_pixel():
      g, n = pixel_graph(mask, connectivity=2)
      px, ds = central_pixel(g, n, shape=mask.shape)
      np.testing.assert_array_equal(px, (1, 1))
      s2 = np.sqrt(2)
      np.testing.assert_allclose(
          ds, [s2 * 3 + 2, s2 + 2, s2 * 2 + 2, s2 * 2 + 2]
      )
  
      # test raveled coordinate
      px, _ = central_pixel(g, n)
      assert px == 4
  
      # test no nodes given
      px, _ = central_pixel(g)
      assert px == 1
  
imports: import numpy
  from skimage.graph._graph import pixel_graph, central_pixel
label_desc: Use image node_id 2 for calling a global function with example usage: test_central_pixel() without return types