code: def test_transform_boxes(self, device, dtype):
      # Define boxes in XYXY format for simplicity.
      boxes_xyxy = torch.tensor(
          [[139.2640, 103.0150, 398.3120, 411.5225]],
          device=device,
          dtype=dtype,
      )
      expected_boxes_xyxy = torch.tensor(
          [[372.7360, 103.0150, 115.6880, 411.5225]],
          device=device,
          dtype=dtype,
      )
  
      boxes = Boxes.from_tensor(boxes_xyxy)
      expected_boxes = Boxes.from_tensor(
          expected_boxes_xyxy, validate_boxes=False
      )
  
      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,
      )
  
      transformed_boxes = boxes.transform_boxes(trans_mat)
      assert_close(
          transformed_boxes.data,
          expected_boxes.data,
          atol=1e-4,
          rtol=1e-4,
      )
      # inplace check
      assert transformed_boxes is not boxes
  
imports: from functools import partial
  import pytest
  import torch
  from kornia.geometry.boxes import Boxes, Boxes3D
  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