code: def _adjust_hsv_in_yiq(
      image,
      delta_hue,
      scale_saturation,
      scale_value,
  ):
      if image.shape.rank is not None and image.shape.rank < 3:
          raise ValueError("input must be at least 3-D.")
      if image.shape[-1] is not None and image.shape[-1] != 3:
          raise ValueError(
              "input must have 3 channels but instead has {}.".format(
                  image.shape[-1]
              )
          )
      # Construct hsv linear transformation matrix in YIQ space.
      # https://beesbuzz.biz/code/hsv_color_transforms.php
      yiq = tf.constant(
          [
              [0.299, 0.596, 0.211],
              [0.587, -0.274, -0.523],
              [0.114, -0.322, 0.312],
          ],
          dtype=image.dtype,
      )
      yiq_inverse = tf.constant(
          [
              [1.0, 1.0, 1.0],
              [0.95617069, -0.2726886, -1.103744],
              [0.62143257, -0.64681324, 1.70062309],
          ],
          dtype=image.dtype,
      )
      vsu = scale_value * scale_saturation * tf.math.cos(delta_hue)
      vsw = scale_value * scale_saturation * tf.math.sin(delta_hue)
      hsv_transform = tf.convert_to_tensor(
          [[scale_value, 0, 0], [0, vsu, vsw], [0, -vsw, vsu]],
          dtype=image.dtype,
      )
      transform_matrix = yiq @ hsv_transform @ yiq_inverse
  
      image = image @ transform_matrix
      return image
  
file_path: addons/tensorflow_addons/image/distort_image_ops.py
imports: from typing import Optional
  import warnings
  import tensorflow
  from tensorflow_addons import options
  from tensorflow_addons.utils.resource_loader import LazySO
  from tensorflow_addons.utils.types import Number, TensorLike
label_desc: Use image node_id 2 for calling a global function with example usage: _adjust_hsv_in_yiq(image, delta_hue, scale_saturation, scale_value) and returns: image