code: def relabel(labeled, inplace=False):
      """
      relabeled, nr_objs = relabel(labeled, inplace=False)
  
      Relabeling ensures that ``relabeled`` is a labeled image such that every
      label from 1 to ``relabeled.max()`` is used (0 is reserved for the
      background and is passed through).
  
      Example::
  
          labeled,n = label(some_binary_map)
          for region in range(n):
              if not good_region(labeled, region + 1):
                  # This deletes the region:
                  labeled[labeled == (region + 1)] = 0
          relabel(labeled, inplace=True)
  
      Parameters
      ----------
      relabeled : ndarray of int
          A labeled array
      inplace : boolean, optional
          Whether to perform relabeling inplace, erasing the values in
          ``labeled`` (default: False)
  
      Returns
      -------
      relabeled: ndarray
      nr_objs : int
          Number of objects
  
      See Also
      --------
      label : function
      """
      labeled = _as_labeled(
          labeled, labeled, "relabel", inplace=inplace
      )
      n = _labeled.relabel(labeled)
      return labeled, n
  
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 2 for calling a global function with example usage: relabel(labeled, inplace) and returns: labeled,  n