code: def adjust_hue(img: Tensor, hue_factor: float) -> Tensor:
      """Adjust hue of an image.
  
      The image hue is adjusted by converting the image to HSV and
      cyclically shifting the intensities in the hue channel (H).
      The image is then converted back to original image mode.
  
      `hue_factor` is the amount of shift in H channel and must be in the
      interval `[-0.5, 0.5]`.
  
      See `Hue`_ for more details.
  
      .. _Hue: https://en.wikipedia.org/wiki/Hue
  
      Args:
          img (PIL Image or Tensor): Image to be adjusted.
              If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format,
              where ... means it can have an arbitrary number of leading dimensions.
              If img is PIL Image mode "1", "I", "F" and modes with transparency (alpha channel) are not supported.
              Note: the pixel values of the input image has to be non-negative for conversion to HSV space;
              thus it does not work if you normalize your image to an interval with negative values,
              or use an interpolation that generates negative values before using this function.
          hue_factor (float):  How much to shift the hue channel. Should be in
              [-0.5, 0.5]. 0.5 and -0.5 give complete reversal of hue channel in
              HSV space in positive and negative direction respectively.
              0 means no shift. Therefore, both -0.5 and 0.5 will give an image
              with complementary colors while 0 gives the original image.
  
      Returns:
          PIL Image or Tensor: Hue adjusted image.
      """
      if not torch.jit.is_scripting() and not torch.jit.is_tracing():
          _log_api_usage_once(adjust_hue)
      if not isinstance(img, torch.Tensor):
          return F_pil.adjust_hue(img, hue_factor)
  
      return F_t.adjust_hue(img, hue_factor)
  
imports: import math
  import numbers
  import sys
  import warnings
  from enum import Enum
  from typing import Any, List, Optional, Tuple, Union
  import numpy
  import torch
  from PIL import Image
  from torch import Tensor
  from ..utils import _log_api_usage_once
  from .None import _functional_pil, _functional_tensor
label_desc: Use image node_id 27 for calling a global function with example usage: adjust_hue(img, hue_factor) and returns: F_t, F_pil