code: def yuv422_to_rgb(
      imagey: torch.Tensor, imageuv: torch.Tensor
  ) -> torch.Tensor:
      r"""Convert an YUV422 image to RGB.
  
      The image data is assumed to be in the range of (0, 1) for luma and (-0.5, 0.5) for chroma.
      Input need to be padded to be evenly divisible by 2 vertical. This function assumed chroma siting is (0.5)
  
      Args:
          imagey: Y (luma) Image plane to be converted to RGB with shape :math:`(*, 1, H, W)`.
          imageuv: UV (luma) Image planes to be converted to RGB with shape :math:`(*, 2, H, W/2)`.
  
      Returns:
          RGB version of the image with shape :math:`(*, 3, H, W)`.
  
      Example:
          >>> inputy = torch.rand(2, 1, 4, 6)
          >>> inputuv = torch.rand(2, 2, 2, 3)
          >>> output = yuv420_to_rgb(inputy, inputuv)  # 2x3x4x5
      """
      if not isinstance(imagey, torch.Tensor):
          raise TypeError(
              f"Input type is not a torch.Tensor. Got {type(imagey)}"
          )
  
      if not isinstance(imageuv, torch.Tensor):
          raise TypeError(
              f"Input type is not a torch.Tensor. Got {type(imageuv)}"
          )
  
      if len(imagey.shape) < 3 or imagey.shape[-3] != 1:
          raise ValueError(
              f"Input imagey size must have a shape of (*, 1, H, W). Got {imagey.shape}"
          )
  
      if len(imageuv.shape) < 3 or imageuv.shape[-3] != 2:
          raise ValueError(
              f"Input imageuv size must have a shape of (*, 2, H, W/2). Got {imageuv.shape}"
          )
  
      if (
          len(imagey.shape) < 2
          or imagey.shape[-2] % 2 == 1
          or imagey.shape[-1] % 2 == 1
      ):
          raise ValueError(
              f"Input H&W must be evenly disible by 2. Got {imagey.shape}"
          )
  
      if (
          len(imageuv.shape) < 2
          or len(imagey.shape) < 2
          or imagey.shape[-1] / imageuv.shape[-1] != 2
      ):
          raise ValueError(
              f"Input imageuv W must be half the size of the luma plane. Got {imagey.shape} and {imageuv.shape}"
          )
  
      # first upsample
      yuv444image = torch.cat(
          [imagey, imageuv.repeat_interleave(2, dim=-1)], dim=-3
      )
      # then convert the yuv444 tensor
      return yuv_to_rgb(yuv444image)
  
imports: from typing import Tuple
  import torch
  from torch import nn
label_desc: Use image node_id 6 for calling a global function with example usage: yuv422_to_rgb(imagey, imageuv) and returns: yuv_to_rgb