code: def shift_hsv(img, hue_shift, sat_shift, val_shift):
      if hue_shift == 0 and sat_shift == 0 and val_shift == 0:
          return img
  
      is_gray = is_grayscale_image(img)
      if is_gray:
          if hue_shift != 0 or sat_shift != 0:
              hue_shift = 0
              sat_shift = 0
              warn(
                  "HueSaturationValue: hue_shift and sat_shift are not applicable to grayscale image. "
                  "Set them to 0 or use RGB image"
              )
          img = cv2.cvtColor(img, cv2.COLOR_GRAY2RGB)
  
      if img.dtype == np.uint8:
          img = _shift_hsv_uint8(img, hue_shift, sat_shift, val_shift)
      else:
          img = _shift_hsv_non_uint8(
              img, hue_shift, sat_shift, val_shift
          )
  
      if is_gray:
          img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
  
      return img
  
imports: from __future__ import division
  from typing import Optional, Sequence, Union
  from warnings import warn
  import cv2
  import numpy
  import skimage
  from albumentations import random_utils
  from albumentations.augmentations.utils import MAX_VALUES_BY_DTYPE, _maybe_process_in_chunks, clip, clipped, ensure_contiguous, is_grayscale_image, is_rgb_image, non_rgb_warning, preserve_channel_dim, preserve_shape
label_desc: Use image node_id 6 for calling a global function with example usage: shift_hsv(img, hue_shift, sat_shift, val_shift) and returns: img, img