def METHOD_NAME(self):
    # return_datasample
    img_path = 'tests/data/det_toy_dataset/imgs/test/img_1.jpg'
    res = self.inferencer(img_path, return_datasamples=True)
    self.assertTrue(is_type_list(res['predictions'], TextDetDataSample))
    # dump predictions
    with tempfile.TemporaryDirectory() as tmp_dir:
        res = self.inferencer(
            img_path, print_result=True, out_dir=tmp_dir, save_pred=True)
        dumped_res = mmengine.load(
            osp.join(tmp_dir, 'preds', 'img_1.json'))
        self.assert_prediction_equal(res['predictions'][0], dumped_res)