code: def test_crop_by_boxes_resizing(self, device, dtype):
      inp = torch.tensor(
          [
              [
                  [
                      [1.0, 2.0, 3.0, 4.0],
                      [5.0, 6.0, 7.0, 8.0],
                      [9.0, 10.0, 11.0, 12.0],
                      [13.0, 14.0, 15.0, 16.0],
                  ]
              ]
          ],
          device=device,
          dtype=dtype,
      )
  
      transform = torch.tensor(
          [[[2.0, 0.0, -2.0], [0.0, 1.0, -1.0], [0.0, 0.0, 1.0]]],
          device=device,
          dtype=dtype,
      )  # 1x3x3
  
      expected = torch.tensor(
          [[[[6.0, 6.5, 7.0], [10.0, 10.5, 11.0]]]],
          device=device,
          dtype=dtype,
      )
  
      patches = kornia.geometry.transform.crop_by_transform_mat(
          inp, transform, (2, 3)
      )
      assert_close(patches, expected, rtol=1e-4, atol=1e-4)
  
imports: import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.testing
  from kornia.testing import assert_close
label_desc: Use image node_id 2 for calling the TestCropByTransform obj's underlying member method code with example usage: obj.test_crop_by_boxes_resizing(device, dtype) without return types