code: def test_getboxes(self):
      class MockDataset:
          def class2size(self, classname, residual):
              sizes = torch.tensor([[1, 1, 1], [0, 0, 0]]).float()
              return sizes[classname] + residual
  
          def class2angle(self, classname, residual):
              return 0
  
      batch_size = 2
      num_samples = 4
      results = VoteNetResults(
          center=torch.zeros((2, 4, 3)),
          heading_scores=torch.zeros(batch_size, num_samples, 1),
          heading_residuals=torch.zeros(batch_size, num_samples, 1),
          size_scores=torch.zeros(batch_size, num_samples, 1),
          size_residuals=torch.zeros(batch_size, num_samples, 2, 3),
          objectness_scores=torch.ones(batch_size, num_samples, 2),
          sem_cls_scores=torch.ones(batch_size, num_samples, 1),
      )
  
      boxes = results.get_boxes(MockDataset())
      self.assertEqual(len(boxes), batch_size)
      self.assertEqual(len(boxes[0]), num_samples)
      box = boxes[0][0]
  
      np.testing.assert_allclose(
          box.corners3d,
          np.asarray(
              [
                  [-0.5, -0.5, -0.5],
                  [0.5, -0.5, -0.5],
                  [0.5, 0.5, -0.5],
                  [-0.5, 0.5, -0.5],
                  [-0.5, -0.5, 0.5],
                  [0.5, -0.5, 0.5],
                  [0.5, 0.5, 0.5],
                  [-0.5, 0.5, 0.5],
              ]
          ),
      )
      self.assertAlmostEqual(box.score, 0.5)
  
imports: import os
  import sys
  import unittest
  import torch
  import numpy
  from torch_points3d.utils.box_utils import box_corners_from_param, box3d_vol, intersection_area, convex_hull_graham, nms_samecls, box3d_iou
  from torch_points3d.modules.VoteNet.votenet_results import VoteNetResults
  from torch_points3d.metrics.box_detection.ap import eval_detection
  from torch_points3d.datasets.object_detection.box_data import BoxData
label_desc: Use image node_id 2 for calling the TestVotenetResults obj's underlying member method code with example usage: obj.test_getboxes() and returns: unknown, int