code: def test_matrix(self, device, dtype, batch_size):
      q = Quaternion.random(batch_size, device, dtype)
      t = self._make_rand_data(device, dtype, batch_size, dims=3)
      rot = So3(q)
      s = Se3(rot, t)
      rot_mat = s.matrix()
      assert rot_mat.shape[-2:] == (4, 4)
      if batch_size is not None:
          assert rot_mat.shape[0] == batch_size
      self.assert_close(rot_mat[..., 0:3, 0:3], rot.matrix())
      self.assert_close(rot_mat[..., 0:3, 3], t)
  
imports: import pytest
  import torch
  from kornia.geometry.conversions import euler_from_quaternion, rotation_matrix_to_quaternion
  from kornia.geometry.liegroup import Se3, So3
  from kornia.geometry.quaternion import Quaternion
  from kornia.geometry.vector import Vector3
  from kornia.testing import BaseTester
label_desc: Use image node_id 19 for calling the TestSe3 obj's underlying member method code with example usage: obj.test_matrix(device, dtype, batch_size) without return types