code: def test_get_boxes_shape(self, device, dtype):
      box = Boxes(
          torch.tensor(
              [[[1.0, 1.0], [3.0, 2.0], [1.0, 2.0], [3.0, 1.0]]],
              device=device,
              dtype=dtype,
          )
      )
      t_boxes = torch.tensor(
          [
              [[1.0, 1.0], [3.0, 1.0], [1.0, 2.0], [3.0, 2.0]],
              [[5.0, 4.0], [2.0, 2.0], [5.0, 2.0], [2.0, 4.0]],
          ],
          device=device,
          dtype=dtype,
      )  # (2, 4, 2)
      boxes = Boxes(t_boxes)
      boxes_batch = Boxes(t_boxes[None])  # (1, 2, 4, 2)
  
      # Single box
      h, w = box.get_boxes_shape()
      assert (h.item(), w.item()) == (2, 3)
  
      # Boxes
      h, w = boxes.get_boxes_shape()
      assert h.ndim == 1
      assert w.ndim == 1
      assert len(h) == 2
      assert len(w) == 2
      assert_close(
          h, torch.as_tensor([2.0, 3.0], device=device, dtype=dtype)
      )
      assert_close(
          w, torch.as_tensor([3.0, 4.0], device=device, dtype=dtype)
      )
  
      # Box batch
      h, w = boxes_batch.get_boxes_shape()
      assert h.ndim == 2
      assert w.ndim == 2
      assert h.shape == (1, 2)
      assert w.shape == (1, 2)
      assert_close(
          h, torch.as_tensor([[2.0, 3.0]], device=device, dtype=dtype)
      )
      assert_close(
          w, torch.as_tensor([[3.0, 4.0]], device=device, dtype=dtype)
      )
  
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 2 for calling the TestBoxes2D obj's underlying member method code with example usage: obj.test_get_boxes_shape(device, dtype) without return types