code: def test_init(self):
      th_boxes = torch.Tensor([10, 10, 20, 20]).reshape(1, 1, 4)
      th_boxes_cxcywh = torch.Tensor([15, 15, 10, 10]).reshape(1, 1, 4)
  
      boxes = HorizontalBoxes(th_boxes)
      assert_allclose(boxes.tensor, th_boxes)
      boxes = HorizontalBoxes(th_boxes, in_mode="xyxy")
      assert_allclose(boxes.tensor, th_boxes)
      boxes = HorizontalBoxes(th_boxes_cxcywh, in_mode="cxcywh")
      assert_allclose(boxes.tensor, th_boxes)
      with self.assertRaises(ValueError):
          boxes = HorizontalBoxes(th_boxes, in_mode="invalid")
  
imports: import random
  from math import sqrt
  from unittest import TestCase
  import cv2
  import numpy
  import torch
  from mmengine.testing import assert_allclose
  from mmdet.structures.bbox import HorizontalBoxes
  from mmdet.structures.mask import BitmapMasks, PolygonMasks
label_desc: Use image node_id 1 for calling the TestHorizontalBoxes obj's underlying member method code with example usage: obj.test_init() without return types