code: def slic(array, spacer=16, m=1.0, max_iters=128):
      """Compute SLIC superpixel oversegmentation
  
      Note: This function operates on the array values. In the original
      publication, SLIC was applied in L*a*b* space.
  
      To use the original mode, use::
  
          rgb = mh.demos.load('lena')
          lab = mh.colors.rgb2lab(rgb)
          superseg,nr = mh.segmentation.slic(lab)
  
      See the mahotas.color module for color space transformations
  
      Parameters
      ----------
      array : ndarray
      spacer : int, optional
          x/y spacing between initial seeds. Initial seeds will be placed at
          ``array[spacer/2::spacer,spacer/::spacer]``
      m : float, optional
          tradeoff between colour space and spatial distance.
      max_iters : int, optional
          Maximum number of k-means iterations. Generally this does not need to
          be very large because the search is only local and convergence is
          very fast, in which case, the algorithm will exit early. (default: 128)
  
      Returns
      -------
      segmented : ndarray
          A segmented area numbered 1..N. The general mahotas convention is that
          region 0 is background. Thus, 1..N is used here.
      n_segments : int
          Number of segments
  
      References
      ----------
      .. [1] Radhakrishna Achanta, Appu Shaji, Kevin Smith, Aurelien Lucchi,
          Pascal Fua, and Sabine Süsstrunk, SLIC Superpixels Compared to
          State-of-the-art Superpixel Methods, TPAMI, May 2012.
      """
      array = np.ascontiguousarray(array, dtype=np.float32)
      _check_3(array, "slic")
      labels = np.zeros((array.shape[0], array.shape[1]), dtype=np.intc)
      labels = labels.copy()
      n = _labeled.slic(
          array, labels, int(spacer), float(m), int(max_iters)
      )
      return labels, n
  
imports: from __future__ import division
  import numpy
  from .internal import _check_3
  from .None import _distance
  from .None import _labeled
label_desc: Use image node_id 2 for calling a global function with example usage: slic(array, spacer, m, max_iters) and returns: labels,  n