code: def blur_mean_shift_(
      image, spatial_window_radius, color_window_radius
  ):
      """Apply a pyramidic mean shift filter to the input image in-place.
  
      This produces an output image that has similarity with one modified by
      a bilateral filter. That is different from mean shift *segmentation*,
      which averages the colors in segments found by mean shift clustering.
  
      This function is a thin wrapper around ``cv2.pyrMeanShiftFiltering``.
  
      .. note::
  
          This function does *not* change the image's colorspace to ``RGB``
          before applying the mean shift filter. A non-``RGB`` colorspace will
          hence influence the results.
  
      .. note::
  
          This function is quite slow.
  
      Added in 0.4.0.
  
      **Supported dtypes**:
  
          * ``uint8``: yes; fully tested
          * ``uint16``: no (1)
          * ``uint32``: no (1)
          * ``uint64``: no (1)
          * ``int8``: no (1)
          * ``int16``: no (1)
          * ``int32``: no (1)
          * ``int64``: no (1)
          * ``float16``: no (1)
          * ``float32``: no (1)
          * ``float64``: no (1)
          * ``float128``: no (1)
          * ``bool``: no (1)
  
          - (1) Not supported by ``cv2.pyrMeanShiftFiltering``.
  
      Parameters
      ----------
      image : ndarray
          ``(H,W)`` or ``(H,W,1)`` or ``(H,W,3)`` image to blur.
          Images with no or one channel will be temporarily tiled to have
          three channels.
  
      spatial_window_radius : number
          Spatial radius for pixels that are assumed to be similar.
  
      color_window_radius : number
          Color radius for pixels that are assumed to be similar.
  
      Returns
      -------
      ndarray
          Blurred input image. Same shape and dtype as the input.
          (Input image *might* have been altered in-place.)
  
      """
      if 0 in image.shape[0:2]:
          return image
  
      # opencv method only supports uint8
      iadt.allow_only_uint8({image.dtype})
  
      shape_is_hw = image.ndim == 2
      shape_is_hw1 = image.ndim == 3 and image.shape[-1] == 1
      shape_is_hw3 = image.ndim == 3 and image.shape[-1] == 3
  
      assert shape_is_hw or shape_is_hw1 or shape_is_hw3, (
          "Expected (H,W) or (H,W,1) or (H,W,3) image, "
          "got shape %s." % (image.shape,)
      )
  
      # opencv method only supports (H,W,3), so we have to tile here for (H,W)
      # and (H,W,1)
      if shape_is_hw:
          image = np.tile(image[..., np.newaxis], (1, 1, 3))
      elif shape_is_hw1:
          image = np.tile(image, (1, 1, 3))
  
      spatial_window_radius = max(spatial_window_radius, 0)
      color_window_radius = max(color_window_radius, 0)
  
      image = _normalize_cv2_input_arr_(image)
      image = cv2.pyrMeanShiftFiltering(
          image,
          sp=spatial_window_radius,
          sr=color_window_radius,
          dst=image,
      )
  
      if shape_is_hw:
          image = image[..., 0]
      elif shape_is_hw1:
          image = image[..., 0:1]
  
      return image
  
imports: from __future__ import print_function, division, absolute_import
  import numpy
  from scipy import ndimage
  import cv2
  import six.moves
  import imgaug
  from imgaug.imgaug import _normalize_cv2_input_arr_
  from .None import meta
  from .None import convolutional
  from ..None import parameters
  from ..None import dtypes
label_desc: Use image node_id 6 for calling a global function with example usage: blur_mean_shift_(image, spatial_window_radius, color_window_radius) and returns: image, image