code: def test_forward(self):
      postprocessor = SDMGRPostProcessor()
      data_samples = postprocessor(
          self.preds, copy.deepcopy(self.data_samples)
      )
      self.assertEqual(
          data_samples[0].pred_instances.labels.shape, (2,)
      )
      self.assertEqual(
          data_samples[0].pred_instances.scores.shape, (2,)
      )
      self.assertEqual(
          data_samples[0].pred_instances.edge_labels.shape, (2, 2)
      )
      self.assertEqual(
          data_samples[0].pred_instances.edge_scores.shape, (2, 2)
      )
      self.assertEqual(
          data_samples[1].pred_instances.labels.shape, (4,)
      )
      self.assertEqual(
          data_samples[1].pred_instances.scores.shape, (4,)
      )
      self.assertEqual(
          data_samples[1].pred_instances.edge_labels.shape, (4, 4)
      )
      self.assertEqual(
          data_samples[1].pred_instances.edge_scores.shape, (4, 4)
      )
  
file_path: mmocr/tests/test_models/test_kie/test_postprocessors/test_sdmgr_postprocessor.py
imports: import copy
  from unittest import TestCase
  import torch
  from mmengine.structures import InstanceData
  from mmocr.models.kie.postprocessors import SDMGRPostProcessor
  from mmocr.structures import KIEDataSample
label_desc: Use image node_id 4 for calling the TestSDMGRPostProcessor obj's underlying member method code with example usage: obj.test_forward() without return types