code: def _blur_gaussian_cv2(image, sigma, ksize):
      dtype = image.dtype
  
      if dtype.kind == "b":
          image = image.astype(np.float32, copy=False)
      elif dtype == iadt._FLOAT16_DTYPE:
          image = image.astype(np.float32, copy=False)
      elif dtype == iadt._INT8_DTYPE:
          image = image.astype(np.int16, copy=False)
      elif dtype == iadt._INT32_DTYPE:
          image = image.astype(np.float64, copy=False)
  
      # ksize here is derived from the equation to compute sigma based
      # on ksize, see
      # https://docs.opencv.org/3.1.0/d4/d86/group__imgproc__filter.html
      # -> cv::getGaussianKernel()
      # example values:
      #   sig = 0.1 -> ksize = -1.666
      #   sig = 0.5 -> ksize = 0.9999
      #   sig = 1.0 -> ksize = 1.0
      #   sig = 2.0 -> ksize = 11.0
      #   sig = 3.0 -> ksize = 17.666
      # ksize = ((sig - 0.8)/0.3 + 1)/0.5 + 1
  
      if ksize is None:
          ksize = _compute_gaussian_blur_ksize(sigma)
      else:
          assert ia.is_single_integer(
              ksize
          ), "Expected 'ksize' argument to be a number, " "got %s." % (
              type(ksize),
          )
          ksize = ksize + 1 if ksize % 2 == 0 else ksize
  
      image_warped = image
      if ksize > 0:
          # works with >512 channels
          # normalization not required here
          # dst seems to not help here
          image_warped = cv2.GaussianBlur(
              image,
              (ksize, ksize),
              sigmaX=sigma,
              sigmaY=sigma,
              borderType=cv2.BORDER_REFLECT_101,
          )
  
          if image_warped.ndim == 2 and image.ndim == 3:
              image_warped = image_warped[..., np.newaxis]
  
      if dtype.kind == "b":
          image_warped = image_warped > 0.5
      elif dtype != image.dtype:
          image_warped = iadt.restore_dtypes_(image_warped, dtype)
  
      return image_warped
  
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 3 for calling a global function with example usage: _blur_gaussian_cv2(image, sigma, ksize) and returns: image_warped