code: def hsv2gray(tens: Tensor) -> Tensor:
      r"""
          Converts a HSV Tensor to its Grayscale version.
  
      Args:
          tens (Tensor): Valid HSV Tensor
  
      Returns:
          Grayscale Tensor of shape ``(height, width, channels)``
  
      Raises:
          ValueError: If `tens` is not of shape 3
  
      """
      if not _is_hsv_image(tens):
          raise ValueError(
              f"Tensor of shape 3 expected. Found shape {len(tens.shape)}. "
              "This function converts a HSV Tensor to its Grayscale counterpart"
          )
  
      bgr = hsv2bgr(tens)
  
      img = bgr2gray(bgr)
      return to_tensor(img, cspace="gray")
  
file_path: caer/caer/color/_hsv.py
imports: import cv2
  from ..coreten import Tensor, to_tensor
  from ._constants import HSV2BGR, HSV2RGB
  from ._bgr import bgr2gray, bgr2lab, bgr2hls, bgr2yuv, bgr2luv
label_desc: Use image node_id 4 for calling a global function with example usage: hsv2gray(tens) and returns: to_tensor