code: def test_exception(self, device, dtype):
      to_check_1 = torch.rand((7, 4, 4, 3), device=device, dtype=dtype)
      to_check_2 = torch.rand((5, 10, 10), device=device, dtype=dtype)
      to_check_3 = torch.rand((3, 3), device=device, dtype=dtype)
  
      # Testing if exception is thrown when the input has shape (7, 4, 4, 3)
      with pytest.raises(ValueError):
          _ = kornia.geometry.inverse_transformation(to_check_1)
  
      # Testing if exception is thrown when the input has shape (5, 10, 10)
      with pytest.raises(ValueError):
          _ = kornia.geometry.inverse_transformation(to_check_2)
  
      # Testing if exception is thrown when the input has shape (3, 3)
      with pytest.raises(ValueError):
          _ = kornia.geometry.inverse_transformation(to_check_3)
  
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.geometry.linalg
  import kornia.testing
  from kornia.testing import BaseTester, assert_close
label_desc: Use image node_id 2 for calling the TestInverseTransformation obj's underlying member method code with example usage: obj.test_exception(device, dtype) without return types