code: def rgb_to_yuv422(
      image: torch.Tensor,
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      r"""Convert an RGB image to YUV 422 (subsampled).
  
      The image data is assumed to be in the range of (0, 1). Input need to be padded to be evenly divisible by 2
      vertical. This function will output chroma siting (0.5)
  
      Args:
          image: RGB Image to be converted to YUV with shape :math:`(*, 3, H, W)`.
  
      Returns:
         A Tensor containing the Y plane with shape :math:`(*, 1, H, W)`
         A Tensor containing the UV planes with shape :math:`(*, 2, H, W/2)`
  
      Example:
          >>> input = torch.rand(2, 3, 4, 6)
          >>> output = rgb_to_yuv420(input)  # (2x1x4x6, 2x1x4x3)
      """
      if not isinstance(image, torch.Tensor):
          raise TypeError(
              f"Input type is not a torch.Tensor. Got {type(image)}"
          )
  
      if len(image.shape) < 3 or image.shape[-3] != 3:
          raise ValueError(
              f"Input size must have a shape of (*, 3, H, W). Got {image.shape}"
          )
  
      if (
          len(image.shape) < 2
          or image.shape[-2] % 2 == 1
          or image.shape[-1] % 2 == 1
      ):
          raise ValueError(
              f"Input H&W must be evenly disible by 2. Got {image.shape}"
          )
  
      yuvimage = rgb_to_yuv(image)
  
      return (
          yuvimage[..., :1, :, :],
          yuvimage[..., 1:3, :, :].unfold(-1, 2, 2).mean(-1),
      )
  
imports: from typing import Tuple
  import torch
  from torch import nn
label_desc: Use image node_id 3 for calling a global function with example usage: rgb_to_yuv422(image) and returns: yuvimage,  yuvimage