code: def _blob_overlap(blob1, blob2, *, sigma_dim=1):
      """Finds the overlapping area fraction between two blobs.
  
      Returns a float representing fraction of overlapped area. Note that 0.0
      is *always* returned for dimension greater than 3.
  
      Parameters
      ----------
      blob1 : sequence of arrays
          A sequence of ``(row, col, sigma)`` or ``(pln, row, col, sigma)``,
          where ``row, col`` (or ``(pln, row, col)``) are coordinates
          of blob and ``sigma`` is the standard deviation of the Gaussian kernel
          which detected the blob.
      blob2 : sequence of arrays
          A sequence of ``(row, col, sigma)`` or ``(pln, row, col, sigma)``,
          where ``row, col`` (or ``(pln, row, col)``) are coordinates
          of blob and ``sigma`` is the standard deviation of the Gaussian kernel
          which detected the blob.
      sigma_dim : int, optional
          The dimensionality of the sigma value. Can be 1 or the same as the
          dimensionality of the blob space (2 or 3).
  
      Returns
      -------
      f : float
          Fraction of overlapped area (or volume in 3D).
      """
      ndim = len(blob1) - sigma_dim
      if ndim > 3:
          return 0.0
      root_ndim = math.sqrt(ndim)
  
      # we divide coordinates by sigma * sqrt(ndim) to rescale space to isotropy,
      # giving spheres of radius = 1 or < 1.
      if blob1[-1] == blob2[-1] == 0:
          return 0.0
      elif blob1[-1] > blob2[-1]:
          max_sigma = blob1[-sigma_dim:]
          r1 = 1
          r2 = blob2[-1] / blob1[-1]
      else:
          max_sigma = blob2[-sigma_dim:]
          r2 = 1
          r1 = blob1[-1] / blob2[-1]
      pos1 = blob1[:ndim] / (max_sigma * root_ndim)
      pos2 = blob2[:ndim] / (max_sigma * root_ndim)
  
      d = np.sqrt(np.sum((pos2 - pos1) ** 2))
      if (
          d > r1 + r2
      ):  # centers farther than sum of radii, so no overlap
          return 0.0
  
      # one blob is inside the other
      if d <= abs(r1 - r2):
          return 1.0
  
      if ndim == 2:
          return _compute_disk_overlap(d, r1, r2)
  
      else:  # ndim=3 http://mathworld.wolfram.com/Sphere-SphereIntersection.html
          return _compute_sphere_overlap(d, r1, r2)
  
file_path: scikit-image/skimage/feature/blob.py
imports: import math
  import numpy
  import scipy.ndimage
  from scipy import spatial
  from .._shared.filters import gaussian
  from .._shared.utils import _supported_float_type, check_nD
  from ..transform import integral_image
  from ..util import img_as_float
  from ._hessian_det_appx import _hessian_matrix_det
  from .peak import peak_local_max
label_desc: Use image node_id 3 for calling a global function with example usage: _blob_overlap(blob1, blob2) and returns: int, int, int, int, _compute_disk_overlap, _compute_sphere_overlap