code: def assert_predictions_equal(self, pred1, pred2):
      if "det_polygons" in pred1:
          self.assertTrue(
              np.allclose(
                  pred1["det_polygons"], pred2["det_polygons"], 0.1
              )
          )
      if "det_scores" in pred1:
          self.assertTrue(
              np.allclose(pred1["det_scores"], pred2["det_scores"], 0.1)
          )
      if "rec_texts" in pred1:
          self.assertEqual(pred1["rec_texts"], pred2["rec_texts"])
      if "rec_scores" in pred1:
          self.assertTrue(
              np.allclose(pred1["rec_scores"], pred2["rec_scores"], 0.1)
          )
      if "kie_labels" in pred1:
          self.assertEqual(pred1["kie_labels"], pred2["kie_labels"])
      if "kie_scores" in pred1:
          self.assertTrue(
              np.allclose(pred1["kie_scores"], pred2["kie_scores"], 0.1)
          )
      if "kie_edge_scores" in pred1:
          self.assertTrue(
              np.allclose(
                  pred1["kie_edge_scores"],
                  pred2["kie_edge_scores"],
                  0.1,
              )
          )
      if "kie_edge_labels" in pred1:
          self.assertEqual(
              pred1["kie_edge_labels"], pred2["kie_edge_labels"]
          )
  
file_path: mmocr/tests/test_apis/test_inferencers/test_mmocr_inferencer.py
imports: import os.path
  import random
  import tempfile
  from unittest import TestCase, mock
  import mmcv
  import mmengine
  import numpy
  import torch
  from mmocr.apis.inferencers import MMOCRInferencer
label_desc: Use image node_id 2 for calling the TestMMOCRInferencer obj's underlying member method code with example usage: obj.assert_predictions_equal(pred1, pred2) without return types