code: def overlay(im1, im2, c):
      r
      shape = im2.shape
      for ni in shape:
          if ni % 2 == 0:
              raise Exception("Structuring element must be odd-voxeled...")
  
      nx, ny, nz = [(ni - 1) // 2 for ni in shape]
      cx, cy, cz = c
  
      im1[cx-nx:cx+nx+1, cy-ny:cy+ny+1, cz-nz:cz+nz+1] += im2
  
      return im1
docs: r"""
      Overlays ``im2`` onto ``im1``, given voxel coords of center of ``im2``
      in ``im1``.
  
      Parameters
      ----------
      im1 : ND-array
          Original voxelated image
      im2 : ND-array
          Template voxelated image
      c : array_like
          [x, y, z] coordinates in ``im1`` where ``im2`` will be centered
  
      Returns
      -------
      image : ND-array
          A modified version of ``im1``, with ``im2`` overlaid at the specified
          location