def METHOD_NAME(self):
    with tempfile.TemporaryDirectory() as tmpdir:
        output_path = osp.join(tmpdir, 'ocr.json')
        input_data, det_target, spotter_target, recog_target = \
            self._create_dummy_data()
        dump_ocr_data(input_data, output_path, 'textdet')
        result = mmengine.load(output_path)
        self.assertDictEqual(result, det_target)
        dump_ocr_data(input_data, output_path, 'textspotter')
        result = mmengine.load(output_path)
        self.assertDictEqual(result, spotter_target)
        dump_ocr_data(input_data, output_path, 'textrecog')
        result = mmengine.load(output_path)
        self.assertDictEqual(result, recog_target)