code: def test_watershed_labeled():
      import mahotas as mh
  
      S = np.array(
          [
              [0, 0, 0, 0],
              [0, 1, 2, 1],
              [1, 1, 1, 1],
              [0, 0, 1, 0],
              [1, 1, 1, 1],
              [1, 2, 2, 1],
              [1, 1, 2, 2],
          ]
      )
      M = np.array(
          [
              [0, 0, 0, 0],
              [0, 0, 1, 0],
              [0, 0, 0, 0],
              [0, 0, 0, 0],
              [0, 0, 0, 0],
              [0, 2, 0, 0],
              [0, 0, 0, 0],
          ]
      )
      labeled = mh.cwatershed(S, M)
      sizes = mh.labeled.labeled_sum(S, labeled)
      assert len(sizes) == labeled.max() + 1
  
file_path: mahotas/mahotas/tests/test_watershed.py
imports: import numpy
  import mahotas
  import mahotas
  import sys
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_watershed_labeled() without return types