code: def cwatershed(surface, markers, Bc=None, return_lines=False):
      """
      W = cwatershed(surface, markers, Bc=None, return_lines=False)
      W,WL = cwatershed(surface, markers, Bc=None, return_lines=True)
  
      Seeded watershed in n-dimensions
  
      This function computes the watershed transform on the input surface (which
      may actually be an n-dimensional volume).
  
      This function requires initial seed points. A traditional way of
      initializing watershed is to use regional minima::
  
          minima = mh.regmin(f)
          markers,nr_markers = mh.label(minima)
          W = cwatershed(f, minima)
  
      Parameters
      ----------
      surface : image
      markers : image
          initial markers (must be a labeled image, i.e., one where 0 represents
          the background and higher integers represent different regions)
      Bc : ndarray, optional
          structuring element (default: 3x3 cross)
      return_lines : boolean, optional
          whether to return separating lines (in addition to regions)
  
      Returns
      -------
      W : integer ndarray (int64 ints)
          Regions image (i.e., W[i,j] == region for pixel (i,j))
      WL : Lines image (`if return_lines==True`)
      """
      _verify_is_integer_type(markers, "cwatershed")
      if surface.shape != markers.shape:
          raise ValueError(
              "morph.cwatershed: Markers array should have the same shape as value array."
          )
      markers = np.asanyarray(markers, np.int64)
      Bc = get_structuring_elem(surface, Bc)
      return _morph.cwatershed(surface, markers, Bc, bool(return_lines))
  
imports: from __future__ import division
  import numpy
  from .internal import _get_output, _verify_is_integer_type, _check_2
  from .None import _morph
label_desc: Use image node_id 7 for calling a global function with example usage: cwatershed(surface, markers, Bc, return_lines) and returns: _morph