code: def test_intersection_area(self):
      box1 = box_corners_from_param(
          torch.tensor([1, 1, 3]).float(), 0, torch.tensor([0, 0, 0])
      ).numpy()
      box2 = box_corners_from_param(
          torch.tensor([1, 1, 3]).float(),
          np.pi / 2,
          torch.tensor([0, 0, 0]),
      ).numpy()
      rect1 = [(box1[i, 0], box1[i, 1]) for i in range(4)]
      rect2 = [(box2[i, 0], box2[i, 1]) for i in range(4)]
      self.assertAlmostEqual(
          intersection_area(rect1, rect2), 1, places=5
      )
  
      box1 = box_corners_from_param(
          torch.tensor([2, 2, 3]).float(), 0, torch.tensor([1, 1, 0])
      ).numpy()
      box2 = box_corners_from_param(
          torch.tensor([2, 2, 3]).float(), 0, torch.tensor([0, 0, 0])
      ).numpy()
      rect1 = [(box1[i, 0], box1[i, 1]) for i in range(4)]
      rect2 = [(box2[i, 0], box2[i, 1]) for i in range(4)]
      self.assertAlmostEqual(
          intersection_area(rect1, rect2), 1, places=5
      )
  
      rect1 = [(0, 0), (1, 0), (1, 1), (0, 1)]
      rect2 = [(0, 0), (1, 1), (0, 2), (-1, 1)]
      self.assertAlmostEqual(
          intersection_area(rect1, rect2), 0.5, places=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 3 for calling the TestUtils obj's underlying member method code with example usage: obj.test_intersection_area() without return types