code: def _as_labeled(array, labeled, funcname, inplace="unused"):
      """
  
      labeled = _as_labeled(array, labeled, funcname, inplace='unused')
  
      Parameters
      ----------
      array : ndarray
      labeled : ndarray
      funcname : str
      inplace : bool or str, optional
          handles ``inplace`` arguments
      """
      if inplace == "unused":
          labeled = np.require(
              labeled, dtype=np.intc, requirements="CW"
          )
      elif not inplace:
          labeled = np.array(labeled, dtype=np.intc)
      elif labeled.dtype != np.intc or not labeled.flags.carray:
          raise ValueError(
              "mahotas.labeled.%s: labeled must be a C-array of type int"
              % funcname
          )
  
      if array.shape != labeled.shape:
          raise ValueError(
              "mahotas.labeled.%s: `array` is not the same size as `labeled`"
              % funcname
          )
      return labeled
  
imports: from __future__ import division
  import numpy
  from .morph import get_structuring_elem
  from .None import _labeled
  from .internal import _get_output
  from ._filters import _checked_mode2int
  import mahotas
label_desc: Use image node_id 10 for calling a global function with example usage: _as_labeled(array, labeled, funcname, inplace) and returns: labeled