code: def test_transform(self):
      results = self.load(copy.deepcopy(self.results))
  
      self.assertIn("gt_bboxes", results)
      self.assertIsInstance(results["gt_bboxes"], np.ndarray)
      self.assertEqual(results["gt_bboxes"].shape, (2, 4))
      self.assertEqual(results["gt_bboxes"].dtype, np.float32)
  
      self.assertIn("gt_bboxes_labels", results)
      self.assertIsInstance(results["gt_bboxes_labels"], np.ndarray)
      self.assertEqual(results["gt_bboxes_labels"].shape, (2,))
      self.assertEqual(results["gt_bboxes_labels"].dtype, np.int64)
  
      self.assertIn("gt_edges_labels", results)
      self.assertIsInstance(results["gt_edges_labels"], np.ndarray)
      self.assertEqual(results["gt_edges_labels"].shape, (2, 2))
      self.assertEqual(results["gt_edges_labels"].dtype, np.int64)
  
      self.assertIn("ori_shape", results)
      self.assertEqual(results["ori_shape"], (288, 512))
  
      load = LoadKIEAnnotations(key_node_idx=1, value_node_idx=2)
      results = load(copy.deepcopy(self.results))
      self.assertEqual(results["gt_edges_labels"][0, 1], 1)
      self.assertEqual(results["gt_edges_labels"][1, 0], -1)
  
imports: import copy
  import os.path
  from unittest import TestCase
  import mmcv
  import numpy
  from mmocr.datasets.transforms import InferencerLoader, LoadImageFromFile, LoadKIEAnnotations, LoadOCRAnnotations
label_desc: Use image node_id 2 for calling the TestLoadKIEAnnotations obj's underlying member method code with example usage: obj.test_transform() without return types