code: def test_cardinality(self, device, dtype, shape):
      img = torch.ones(shape, device=device, dtype=dtype)
      shapey = list(shape)
      shapey[-3] = 1
      shapeuv = list(shape)
      shapeuv[-3] = 2
      shapeuv[-2] /= 2
      shapeuv[-1] /= 2
      assert kornia.color.rgb_to_yuv420(img)[0].shape == tuple(shapey)
      assert kornia.color.rgb_to_yuv420(img)[1].shape == tuple(shapeuv)
  
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  from kornia.testing import BaseTester
label_desc: Use image node_id 2 for calling the TestRgbToYuv420 obj's underlying member method code with example usage: obj.test_cardinality(device, dtype, shape) without return types