code: def test_rgb_to_y(self, device, dtype, shape):
      img = torch.rand(*shape, device=device, dtype=dtype)
      output_y = kornia.color.rgb_to_y(img)
      output_ycbcr = kornia.color.rgb_to_ycbcr(img)
      assert torch.equal(output_y, output_ycbcr[..., 0:1, :, :])
  
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  from kornia.testing import BaseTester
label_desc: Use image node_id 3 for calling the TestRgbToYcbcr obj's underlying member method code with example usage: obj.test_rgb_to_y(device, dtype, shape) without return types