code: def smallest_bounding_box(msk):
      """
      Extract the smallest bounding box from a mask
  
      Parameters
      ----------
      msk : ndarray
        Array of boolean
  
      Returns
      -------
      corner: ndarray
        3-dimensional coordinates of bounding box corner
      size: ndarray
        3-dimensional size of bounding box
      """
      x, y, z = np.where(msk > 0)
      corner = np.array([x.min(), y.min(), z.min()])
      size = np.array([x.max() + 1, y.max() + 1, z.max() + 1])
      return corner, size
  
imports: import numpy
  import scipy.ndimage
  from ...core.image.image_spaces import as_xyz_image, make_xyz_image, xyz_affine
  from ._registration import _joint_histogram
  from .affine import affine_transforms, inverse_affine, subgrid_affine
  from .chain_transform import ChainTransform
  from .optimizer import configure_optimizer
  from .similarity_measures import similarity_measures
label_desc: Use image node_id 4 for calling a global function with example usage: smallest_bounding_box(msk) and returns: corner,  size