code: def test_bbox_diag_distance(self):
      # quad [x1, y1, x2, y2, x3, y3, x4, y4]
      # list
      self.assertEqual(bbox_diag_distance(self.box_list1), self.gt1)
      # array
      self.assertEqual(bbox_diag_distance(self.box_array1), self.gt1)
      # tensor
      self.assertEqual(bbox_diag_distance(self.box_tensor1), self.gt1)
      # rect [x1, y1, x2, y2]
      # list
      self.assertAlmostEqual(
          bbox_diag_distance(self.box_list2), self.gt2
      )
      # array
      self.assertAlmostEqual(
          bbox_diag_distance(self.box_array2), self.gt2
      )
      # tensor
      self.assertAlmostEqual(
          bbox_diag_distance(self.box_tensor2), self.gt2
      )
  
imports: import unittest
  import numpy
  import torch
  from mmocr.utils import bbox2poly, bbox_center_distance, bbox_diag_distance, bezier2polygon, is_on_same_line, rescale_bbox, rescale_bboxes, stitch_boxes_into_lines
  from mmocr.utils.bbox_utils import bbox_jitter
label_desc: Use image node_id 2 for calling the TestBoxDiagDistance obj's underlying member method code with example usage: obj.test_bbox_diag_distance() without return types