code: def bgr2yuv(tens: Tensor) -> Tensor:
      r"""
          Converts a BGR Tensor to its YUV version.
  
      Args:
          tens (Tensor): Valid BGR Tensor
  
      Returns:
          YUV Tensor of shape ``(height, width, channels)``
  
      Raises:
          ValueError: If `tens` is not of shape 3
  
      """
      if not _is_bgr_image(tens):
          raise ValueError(
              f"Tensor of shape 3 expected. Found shape {len(tens.shape)}. "
              "This function converts a BGR Tensor to its YUV counterpart"
          )
  
      img = cv.cvtColor(tens, BGR2YUV)
      return to_tensor(img, cspace="yuv")
  
file_path: caer/caer/color/_bgr.py
imports: import cv2
  from ..coreten import Tensor, to_tensor
  from ._constants import BGR2RGB, BGR2GRAY, BGR2HSV, BGR2LAB, BGR2HLS, BGR2YUV, BGR2LUV
label_desc: Use image node_id 7 for calling a global function with example usage: bgr2yuv(tens) and returns: to_tensor