code: def _adjust_hue_in_yiq_np(x_np, delta_h):
      """Rotate hue in YIQ space.
  
      Mathematically we first convert rgb color to yiq space, rotate the hue
      degrees, and then convert back to rgb.
  
      Args:
          x_np: input x with last dimension = 3.
          delta_h: degree of hue rotation, in radians.
  
      Returns:
          Adjusted y with the same shape as x_np.
      """
      assert x_np.shape[-1] == 3
      x_v = x_np.reshape([-1, 3])
      u = np.cos(delta_h)
      w = np.sin(delta_h)
      # Projection matrix from RGB to YIQ. Numbers from wikipedia
      # https://en.wikipedia.org/wiki/YIQ
      tyiq = np.array(
          [
              [0.299, 0.587, 0.114],
              [0.596, -0.274, -0.322],
              [0.211, -0.523, 0.312],
          ]
      ).astype(x_v.dtype)
      inverse_tyiq = np.array(
          [
              [1.0, 0.95617069, 0.62143257],
              [1.0, -0.2726886, -0.64681324],
              [1.0, -1.103744, 1.70062309],
          ]
      ).astype(x_v.dtype)
      y_v = np.dot(x_v, tyiq.T).astype(x_v.dtype)
      # Hue rotation matrix in YIQ space.
      hue_rotation = np.array(
          [[1.0, 0.0, 0.0], [0.0, u, -w], [0.0, w, u]]
      ).astype(x_v.dtype)
      y_v = np.dot(y_v, hue_rotation.T)
      # Projecting back to RGB space.
      y_v = np.dot(y_v, inverse_tyiq.T)
      return y_v.reshape(x_np.shape)
  
imports: import pytest
  import numpy
  import tensorflow
  from tensorflow_addons.image import distort_image_ops
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 1 for calling a global function with example usage: _adjust_hue_in_yiq_np(x_np, delta_h) and returns: y_v