code: def adjust_hue(img, hue_factor):
      assert (
          -0.5 <= hue_factor <= 0.5
      ), "hue_factor should be in range [-0.5, 0.5]"
  
      channels = _get_image_num_channels(img, "CHW")
  
      if channels == 1:
          return img
      elif channels == 3:
          if ivy.dtype(img) == "uint8":
              img = ivy.astype(img, "float32") / 255.0
  
          img_hsv = _rgb_to_hsv(img)
          h, s, v = img_hsv[0], img_hsv[1], img_hsv[2]
  
          h = h + hue_factor
          h = h - ivy.floor(h)
  
          img_adjusted = _hsv_to_rgb(ivy.stack([h, s, v], axis=-3))
  
      else:
          raise ValueError("channels of input should be either 1 or 3.")
  
      return img_adjusted
  
file_path: ivy/ivy/functional/frontends/paddle/vision/transforms.py
imports: import ivy
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_device_and_dtypes
  from ..tensor.tensor import Tensor
  from ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 7 for calling a global function with example usage: adjust_hue(img, hue_factor) and returns: img_adjusted, img