code: def three_d_effect(img, **kwargs):
      
      w = kwargs.get('weight', 1)
      LOG.debug("Applying 3D effect with weight %.2f", w)
      kernel = np.array([[-w, 0, w],
                         [-w, 1, w],
                         [-w, 0, w]])
      mode = kwargs.get('convolve_mode', 'same')
  
      def func(band_data, kernel=kernel, mode=mode, index=None):
          del index
  
          delay = dask.delayed(_three_d_effect_delayed)(band_data, kernel, mode)
          new_data = da.from_delayed(delay, shape=band_data.shape, dtype=band_data.dtype)
          return new_data
  
      return apply_enhancement(img.data, func, separate=True, pass_dask=True)
docs: Create 3D effect using convolution