code: def test_exception(self, device, dtype):
      with pytest.raises(Exception) as errinf:
          kornia.color.raw_to_rgb_2x2_downscaled(
              [0.0], kornia.color.CFA.BG
          )
      assert "Input type is not a torch.Tensor" in str(errinf)
  
      with pytest.raises(TypeError) as errinf:
          img = torch.ones(1, 1, device=device, dtype=dtype)
          kornia.color.raw_to_rgb_2x2_downscaled(
              img, kornia.color.CFA.GB
          )
      assert "shape must be" in str(errinf)
  
      with pytest.raises(TypeError) as errinf:
          img = torch.ones(2, 2, 2, device=device, dtype=dtype)
          kornia.color.raw_to_rgb_2x2_downscaled(
              img, kornia.color.CFA.RG
          )
      assert "shape must be" in str(errinf)
  
      with pytest.raises(Exception) as errinf:
          img = torch.ones(1, 3, 2, device=device, dtype=dtype)
          kornia.color.raw_to_rgb_2x2_downscaled(
              img, kornia.color.CFA.GR
          )
      assert "Input H&W must be evenly disible by 2. Got" in str(errinf)
  
      with pytest.raises(Exception) as errinf:
          img = torch.ones(1, 2, 3, device=device, dtype=dtype)
          kornia.color.raw_to_rgb_2x2_downscaled(
              img, kornia.color.CFA.GR
          )
      assert "Input H&W must be evenly disible by 2. Got" in str(errinf)
  
      with pytest.raises(ValueError) as errinf:
          img = torch.ones(1, 4, 8, device=device, dtype=dtype)
          nonexistent_cfa = 195162495283
          kornia.color.raw_to_rgb_2x2_downscaled(img, nonexistent_cfa)
      assert "Unsupported CFA Got" in str(errinf)
  
imports: import warnings
  import pytest
  import torch
  from packaging import version
  from torch.autograd import gradcheck
  import kornia
  from kornia.testing import BaseTester, assert_close
label_desc: Use image node_id 3 for calling the TestRawToRgb2x2Downscaled obj's underlying member method code with example usage: obj.test_exception(device, dtype) without return types