code: def test_from_tensor(self, shape, device, dtype):
      box_xyzxyz = torch.as_tensor(
          [[1, 2, 3, 4, 5, 6]], device=device, dtype=dtype
      ).view(*shape)
      box_xyzxyz_plus = torch.as_tensor(
          [[1, 2, 3, 3, 4, 5]], device=device, dtype=dtype
      ).view(*shape)
      box_xyzwhd = torch.as_tensor(
          [[1, 2, 3, 3, 3, 3]], device=device, dtype=dtype
      ).view(*shape)
  
      expected_box = torch.as_tensor(
          [
              [
                  [1, 2, 3],
                  [3, 2, 3],
                  [3, 4, 3],
                  [1, 4, 3],
                  [1, 2, 5],
                  [3, 2, 5],
                  [3, 4, 5],
                  [1, 4, 5],
              ]
          ],  # Front  # Back
          device=device,
          dtype=dtype,
      ).view(*shape[:-1], 8, 3)
  
      kornia_xyzxyz = Boxes3D.from_tensor(
          box_xyzxyz, mode="xyzxyz"
      ).data
      kornia_xyzxyz_plus = Boxes3D.from_tensor(
          box_xyzxyz_plus, mode="xyzxyz_plus"
      ).data
      kornia_xyzwhd = Boxes3D.from_tensor(
          box_xyzwhd, mode="xyzwhd"
      ).data
  
      assert kornia_xyzxyz.shape == expected_box.shape
      assert_close(kornia_xyzxyz, expected_box)
  
      assert kornia_xyzxyz_plus.shape == expected_box.shape
      assert_close(kornia_xyzxyz_plus, expected_box)
  
      assert kornia_xyzwhd.shape == expected_box.shape
      assert_close(kornia_xyzwhd, expected_box)
  
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 4 for calling the TestBbox3D obj's underlying member method code with example usage: obj.test_from_tensor(shape, device, dtype) without return types