code: def test_call(self):
      # no visual, single input
      res_novis_1 = self.inferencer_novisual(
          self.data_novisual[0], return_vis=True
      )
      res_novis_2 = self.inferencer_novisual(
          self.data_img_woshape[0], return_vis=True
      )
      self.assert_predictions_equal(
          res_novis_1["predictions"], res_novis_2["predictions"]
      )
      self.assertIn("visualization", res_novis_1)
      self.assertIn("visualization", res_novis_2)
  
      # no visual, multiple inputs
      res_novis_1 = self.inferencer_novisual(
          self.data_novisual, return_vis=True
      )
      res_novis_2 = self.inferencer_novisual(
          self.data_img_woshape, return_vis=True
      )
      self.assert_predictions_equal(
          res_novis_1["predictions"], res_novis_2["predictions"]
      )
      self.assertIn("visualization", res_novis_1)
      self.assertIn("visualization", res_novis_2)
  
      # visual, single input
      res_ndarray = self.inferencer(
          self.data_img_ndarray[0], return_vis=True
      )
      # path
      res_path = self.inferencer(self.data_img_str[0], return_vis=True)
      self.assert_predictions_equal(
          res_path["predictions"], res_ndarray["predictions"]
      )
      self.assertIn("visualization", res_path)
      self.assertIn("visualization", res_ndarray)
      self.assertTrue(
          np.allclose(
              res_ndarray["visualization"], res_path["visualization"]
          )
      )
  
      # visual, multiple inputs & different bs
      res_ndarray = self.inferencer(
          self.data_img_ndarray, return_vis=True
      )
      # path
      res_path = self.inferencer(self.data_img_str, return_vis=True)
      self.assert_predictions_equal(
          res_path["predictions"], res_ndarray["predictions"]
      )
      for vis1, vis2 in zip(
          res_ndarray["visualization"], res_path["visualization"]
      ):
          self.assertTrue(np.allclose(vis1, vis2))
  
imports: import json
  import os.path
  import random
  import tempfile
  from copy import deepcopy
  from unittest import TestCase, mock
  import mmcv
  import mmengine
  import numpy
  import torch
  from mmocr.apis.inferencers import KIEInferencer
  from mmocr.utils.check_argument import is_type_list
  from mmocr.utils.polygon_utils import poly2bbox
  from mmocr.utils.typing_utils import KIEDataSample
label_desc: Use image node_id 5 for calling the TestKIEInferencer obj's underlying member method code with example usage: obj.test_call() without return types