code: def test_compute_metrics(self):
      # Test different strategies
      fake_results = [
          dict(
              iou_metric=np.array([[1, 1], [1, 0]]),
              pred_scores=np.array([1.0, 1.0]),
          )
      ]
  
      # Vanilla
      metric = HmeanIOUMetric(strategy="vanilla")
      eval_results = metric.compute_metrics(fake_results)
      target_result = {"precision": 0.5, "recall": 0.5, "hmean": 0.5}
      self.assertDictEqual(target_result, eval_results)
  
      # Max matching
      metric = HmeanIOUMetric(strategy="max_matching")
      eval_results = metric.compute_metrics(fake_results)
      target_result = {"precision": 1, "recall": 1, "hmean": 1}
      self.assertDictEqual(target_result, eval_results)
  
file_path: mmocr/tests/test_evaluation/test_metrics/test_hmean_iou_metric.py
imports: import unittest
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from mmocr.evaluation import HmeanIOUMetric
  from mmocr.structures import TextDetDataSample
label_desc: Use image node_id 3 for calling the TestHmeanIOU obj's underlying member method code with example usage: obj.test_compute_metrics() without return types