code: def test_boxes_list_to_tensor_list(self, mode, device, dtype):
      src_1 = [
          torch.as_tensor(
              [[[1, 2], [1, 3], [2, 2], [2, 3]]],
              device=device,
              dtype=dtype,
          ),
          torch.as_tensor(
              [
                  [[1, 2], [1, 3], [2, 2], [2, 3]],
                  [[1, 2], [1, 3], [2, 2], [2, 3]],
              ],
              device=device,
              dtype=dtype,
          ),
      ]
      src_2 = [
          torch.as_tensor([[1, 1, 5, 5]], device=device, dtype=dtype),
          torch.as_tensor(
              [[1, 1, 5, 5], [1, 1, 5, 5]], device=device, dtype=dtype
          ),
      ]
      src = src_1 if mode in ["vertices", "vertices_plus"] else src_2
      box = Boxes.from_tensor(src, mode=mode)
      out = box.to_tensor(mode)
      assert out[0].shape == src[0].shape
      assert out[1].shape == src[1].shape
  
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 7 for calling the TestBoxes2D obj's underlying member method code with example usage: obj.test_boxes_list_to_tensor_list(mode, device, dtype) without return types