code: def test_init(self):
      box_tensor = torch.rand((3, 4, 4))
      boxes = ToyBaseBoxes(box_tensor)
  
      boxes = ToyBaseBoxes(box_tensor, dtype=torch.float64)
      self.assertEqual(boxes.tensor.dtype, torch.float64)
  
      if torch.cuda.is_available():
          boxes = ToyBaseBoxes(box_tensor, device="cuda")
          self.assertTrue(boxes.tensor.is_cuda)
  
      with self.assertRaises(AssertionError):
          box_tensor = torch.rand((4,))
          boxes = ToyBaseBoxes(box_tensor)
  
      with self.assertRaises(AssertionError):
          box_tensor = torch.rand((3, 4, 3))
          boxes = ToyBaseBoxes(box_tensor)
  
file_path: mmdetection/tests/test_structures/test_bbox/test_base_boxes.py
imports: from unittest import TestCase
  import numpy
  import torch
  from mmengine.testing import assert_allclose
  from .utils import ToyBaseBoxes
label_desc: Use image node_id 1 for calling the TestBaseBoxes obj's underlying member method code with example usage: obj.test_init() without return types