code: def test_many_to_one(self):
      postprocessor = SDMGRPostProcessor(
          link_type="many-to-one", key_node_idx=1, value_node_idx=2
      )
      data_samples = postprocessor(
          self.preds, copy.deepcopy(self.data_samples)
      )
      for data_sample in data_samples:
          tails, heads = torch.where(
              data_sample.pred_instances.edge_labels == 1
          )
          if len(tails) > 0:
              self.assertTrue(
                  (data_sample.pred_instances.labels[tails] == 1).all()
              )
              self.assertEqual(
                  len(set(tails.numpy().tolist())), len(tails)
              )
          if len(heads) > 0:
              self.assertTrue(
                  (data_sample.pred_instances.labels[heads] == 2).all()
              )
  
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 8 for calling the TestSDMGRPostProcessor obj's underlying member method code with example usage: obj.test_many_to_one() without return types