code: def test_exception(self, device, dtype, batch_size):
      with pytest.raises(ValueError):
          r = So2.random(batch_size)
          t1 = torch.randn((batch_size, 1), dtype=dtype, device=device)
          t2 = torch.randn((batch_size, 3), dtype=dtype, device=device)
          Se2(r, t1)
          Se2(r, t2)
      with pytest.raises(ValueError):
          theta = torch.rand(
              (batch_size, 2), dtype=dtype, device=device
          )
          Se2.exp(theta)
      with pytest.raises(ValueError):
          v = torch.rand((batch_size, 2), dtype=dtype, device=device)
          Se2.hat(v)
      with pytest.raises(ValueError):
          omega = torch.rand((4, 4), dtype=dtype, device=device)
          Se2.vee(omega)
      with pytest.raises(TypeError):
          Se2.identity(1, device, dtype) * [1.0, 2.0, 1.0]
      with pytest.raises(ValueError):
          theta = torch.rand(
              (batch_size, 2), dtype=dtype, device=device
          )
          Se2.hat(theta)
      with pytest.raises(Exception):
          Se2.identity(batch_size=0)
      with pytest.raises(Exception):
          Se2.random(batch_size=0)
      with pytest.raises(Exception):
          x = torch.rand(5, dtype=dtype, device=device)
          y = torch.rand(3, dtype=dtype, device=device)
          Se2.trans(x, y)
  
imports: import pytest
  import torch
  from kornia.geometry.liegroup import Se2, So2
  from kornia.geometry.vector import Vector2
  from kornia.testing import BaseTester
label_desc: Use image node_id 4 for calling the TestSe2 obj's underlying member method code with example usage: obj.test_exception(device, dtype, batch_size) without return types