code: def _sharpness_image(image: TensorLike, factor: Number) -> tf.Tensor:
      """Implements Sharpness function from PIL using TF ops."""
      orig_image = image
      image_dtype = image.dtype
      image_channels = image.shape[-1]
      image = tf.cast(image, tf.float32)
  
      # SMOOTH PIL Kernel.
      kernel = (
          tf.constant(
              [[1, 1, 1], [1, 5, 1], [1, 1, 1]],
              dtype=tf.float32,
              shape=[3, 3, 1, 1],
          )
          / 13.0
      )
      kernel = tf.tile(kernel, [1, 1, image_channels, 1])
  
      # Apply kernel channel-wise.
      degenerate = tf.nn.depthwise_conv2d(
          image,
          kernel,
          strides=[1, 1, 1, 1],
          padding="VALID",
          dilations=[1, 1],
      )
      degenerate = tf.cast(degenerate, image_dtype)
  
      # For the borders of the resulting image, fill in the values of the original image.
      mask = tf.ones_like(degenerate)
      padded_mask = tf.pad(mask, [[0, 0], [1, 1], [1, 1], [0, 0]])
      padded_degenerate = tf.pad(
          degenerate, [[0, 0], [1, 1], [1, 1], [0, 0]]
      )
      result = tf.where(
          tf.equal(padded_mask, 1), padded_degenerate, orig_image
      )
  
      # Blend the final result.
      blended = blend(result, orig_image, factor)
      return tf.cast(blended, image_dtype)
  
file_path: addons/tensorflow_addons/image/color_ops.py
imports: import tensorflow
  from tensorflow_addons.utils.types import TensorLike, Number
  from tensorflow_addons.image.utils import to_4D_image, from_4D_image
  from tensorflow_addons.image.compose_ops import blend
  from typing import Optional
  from functools import partial
label_desc: Use image node_id 4 for calling a global function with example usage: _sharpness_image(image, factor) and returns: tf