code: def _convolve_image_with_kernel(image, kernel):
      num_channels = tf.shape(image)[-1]
      kernel = tf.tile(kernel, [1, 1, num_channels, 1])
      image = tf.expand_dims(image, axis=0)
      convolved_im = tf.nn.depthwise_conv2d(
          tf.cast(image, tf.float32),
          kernel,
          strides=[1, 1, 1, 1],
          padding="SAME",
      )
      # adding 0.5 for future rounding, same as in PIL:
      # https://github.com/python-pillow/Pillow/blob/555e305a60d7fcefd1ad4aa6c8fd879e2f474192/src/libImaging/Filter.c#L101  # pylint: disable=line-too-long
      convolved_im = convolved_im + 0.5
      return tf.squeeze(convolved_im, axis=0)
  
imports: import math
  import tensorflow
  import tensorflow_addons
label_desc: Use image node_id 22 for calling a global function with example usage: _convolve_image_with_kernel(image, kernel) and returns: tf