code: def _get_auto_mask_bounds(img):
      """Compute the bounds of the data with an automatically computed mask."""
      data = safe_get_data(img)
      affine = img.affine
      if hasattr(data, "mask"):
          # Masked array
          mask = np.logical_not(data.mask)
      else:
          # The mask will be anything that is fairly different
          # from the values in the corners
          edge_value = float(
              data[0, 0, 0]
              + data[0, -1, 0]
              + data[-1, 0, 0]
              + data[0, 0, -1]
              + data[-1, -1, 0]
              + data[-1, 0, -1]
              + data[0, -1, -1]
              + data[-1, -1, -1]
          )
          edge_value /= 6
          mask = np.abs(data - edge_value) > 0.005 * np.ptp(data)
      xmin, xmax, ymin, ymax, zmin, zmax = get_mask_bounds(
          new_img_like(img, mask, affine)
      )
      return (xmin, xmax), (ymin, ymax), (zmin, zmax)
  
file_path: nilearn/nilearn/plotting/find_cuts.py
imports: import numbers
  import warnings
  import numpy
  from scipy.ndimage import center_of_mass, find_objects, label
  from nilearn.image import get_data
  from .._utils import check_niimg_3d, check_niimg_4d
  from .._utils.extmath import fast_abs_percentile
  from .._utils.ndimage import largest_connected_component
  from .._utils.niimg import safe_get_data
  from .._utils.numpy_conversions import as_ndarray
  from ..image import iter_img, new_img_like, reorder_img
  from ..image.image import smooth_array
  from ..image.resampling import coord_transform, get_mask_bounds
label_desc: Use image node_id 2 for calling a global function with example usage: _get_auto_mask_bounds(img) and returns: xmin,  xmax,  ymin,  ymax,  zmin,  zmax