code: def test_get_boxes_shape(self, device, dtype):
      box = Boxes3D(
          torch.tensor(
              [
                  [
                      [0, 1, 2],
                      [0, 1, 32],
                      [10, 21, 2],
                      [0, 21, 2],
                      [10, 1, 32],
                      [10, 21, 32],
                      [10, 1, 2],
                      [0, 21, 32],
                  ]
              ],
              device=device,
              dtype=dtype,
          )
      )  # 1x8x3
      t_boxes = torch.tensor(
          [
              [
                  [0, 21, 32],
                  [0, 1, 2],
                  [10, 1, 2],
                  [0, 21, 2],
                  [0, 1, 32],
                  [10, 21, 2],
                  [10, 1, 32],
                  [10, 21, 32],
              ],
              [
                  [3, 4, 5],
                  [3, 4, 65],
                  [43, 54, 5],
                  [3, 54, 5],
                  [43, 4, 5],
                  [43, 4, 65],
                  [43, 54, 65],
                  [3, 54, 65],
              ],
          ],
          device=device,
          dtype=dtype,
      )  # 2x8x3
      boxes = Boxes3D(t_boxes)
      boxes_batch = Boxes3D(t_boxes[None])  # (1, 2, 8, 3)
  
      # Single box
      d, h, w = box.get_boxes_shape()
      assert (d.item(), h.item(), w.item()) == (31.0, 21.0, 11.0)
  
      # Boxes
      d, h, w = boxes.get_boxes_shape()
      assert h.ndim == 1
      assert w.ndim == 1
      assert len(d) == 2
      assert len(h) == 2
      assert len(w) == 2
      assert_close(
          d, torch.as_tensor([31.0, 61.0], device=device, dtype=dtype)
      )
      assert_close(
          h, torch.as_tensor([21.0, 51.0], device=device, dtype=dtype)
      )
      assert_close(
          w, torch.as_tensor([11.0, 41.0], device=device, dtype=dtype)
      )
  
      # Box batch
      d, 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(
          d, torch.as_tensor([[31.0, 61.0]], device=device, dtype=dtype)
      )
      assert_close(
          h, torch.as_tensor([[21.0, 51.0]], device=device, dtype=dtype)
      )
      assert_close(
          w, torch.as_tensor([[11.0, 41.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 TestBbox3D obj's underlying member method code with example usage: obj.test_get_boxes_shape(device, dtype) without return types