code: def test_geodesic_kmeans(nbseeds=3):
      # Test the geodisc k-means algorithm
      myfield = basic_field_random(5, 5, 1)
      seeds = np.argsort(nr.rand(myfield.V))[:nbseeds]
      seeds, label, inertia = myfield.geodesic_kmeans(seeds)
      assert_array_equal(label[seeds], np.arange(nbseeds))
      assert np.array(
          [i in np.unique(label) for i in np.arange(nbseeds)]
      ).all()
  
imports: import numpy
  import numpy.random
  from numpy.testing import assert_array_equal
  from ..field import field_from_coo_matrix_and_data, field_from_graph_and_data
  from ..graph import wgraph_from_3d_grid
label_desc: Use image node_id 24 for calling a global function with example usage: test_geodesic_kmeans(nbseeds) without return types