code: def bbox(f, as_slice=False):
      """
      Bounding boxes of all objects in a labeled array.
  
      After::
  
          bboxes = mh.labeled.bbox(f)
  
      ``bboxes[34]`` will contain the bounding box of ``(f == 34)``.
  
      Parameters
      ----------
      f : integer ndarray
      as_slice : boolean, optional
          Whether to return slice objects instead of integer coordinates
          (default: False).
  
      Returns
      -------
      bboxes : ndarray
  
      See Also
      --------
      mh.bbox : the binary version of this function
      """
      import mahotas._bbox
  
      n = f.max()
      output = np.empty(f.ndim * 2 * (n + 1), np.intp)
      output = mahotas._bbox.bbox_labeled(f, output)
      output = output.reshape((n + 1, 2 * f.ndim))
      if as_slice:
          output = [
              tuple([slice(s, e) for s, e in r.reshape((-1, 2))])
              for r in output
          ]
      return output
  
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 17 for calling a global function with example usage: bbox(f, as_slice) and returns: output