code: def gaussian_blur(img, sigma=5):
      """Applies gaussian blur to the given image.
  
      Args:
        img: The input image.
        sigma: The gaussian kernel size.
  
      Returns:
        Gaussian blurred image.
      """
      kernel_size = 2 * sigma
  
      def gauss_kernel(channels, kernel_size, sigma):
          ax = tf.range(-kernel_size // 2 + 1.0, kernel_size // 2 + 1.0)
          xx, yy = tf.meshgrid(ax, ax)
          kernel = tf.exp(-(xx**2 + yy**2) / (2.0 * sigma**2))
          kernel = kernel / tf.reduce_sum(kernel)
          kernel = tf.tile(kernel[..., tf.newaxis], [1, 1, channels])
          return kernel
  
      gaussian_kernel = gauss_kernel(
          tf.shape(img)[-1], kernel_size, sigma
      )
      gaussian_kernel = gaussian_kernel[..., tf.newaxis]
      blurred_image = tf.nn.depthwise_conv2d(
          tf.expand_dims(img, axis=0),
          gaussian_kernel,
          [1, 1, 1, 1],
          padding="SAME",
          data_format="NHWC",
      )
      return tf.squeeze(blurred_image, axis=0)
  
file_path: graphics/tensorflow_graphics/projects/points_to_3Dobjects/utils/tf_utils.py
imports: import numpy
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: gaussian_blur(img, sigma) and returns: tf, kernel