code: def test_transform_boxes(self, device, dtype):
      boxes = torch.tensor(
          [[139.2640, 103.0150, 397.3120, 410.5225]],
          device=device,
          dtype=dtype,
      )
  
      expected = torch.tensor(
          [[114.6880, 103.0150, 372.7360, 410.5225]],
          device=device,
          dtype=dtype,
      )
  
      trans_mat = torch.tensor(
          [[[-1.0, 0.0, 512.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]],
          device=device,
          dtype=dtype,
      )
  
      out = transform_bbox(trans_mat, boxes, restore_coordinates=True)
      assert_close(out, expected, atol=1e-4, rtol=1e-4)
  
imports: import torch
  import kornia
  from kornia.geometry.bbox import infer_bbox_shape, infer_bbox_shape3d, nms, transform_bbox, validate_bbox, validate_bbox3d
  from kornia.testing import assert_close, gradcheck, tensor_to_gradcheck_var
label_desc: Use image node_id 1 for calling the TestTransformBoxes2D obj's underlying member method code with example usage: obj.test_transform_boxes(device, dtype) without return types