def METHOD_NAME(data, model, tokenizer, batch_size=1, max_cls_len=5, summary_num=2):
    examples = []
    for text in data:
        example = {"text": text}
        input_ids, token_type_ids, label_indices = convert_example(
            example, tokenizer, max_seq_len=args.max_seq_len, is_test=True
        )
        examples.append((input_ids, token_type_ids, label_indices))
    batches = [examples[idx : idx + batch_size] for idx in range(0, len(examples), batch_size)]
    batchify_fn = lambda samples, fn=Tuple(  # noqa: E731
        Pad(axis=0, pad_val=tokenizer.pad_token_id, dtype="int64"),  # input_ids
        Pad(axis=0, pad_val=tokenizer.pad_token_type_id, dtype="int64"),  # token_type_ids
        Stack(dtype="int64"),  # label_indices
    ): fn(samples)
    name_dict, bk_tree, id_vocabs, vocab_ids = construct_dict_map(
        tokenizer, os.path.join(args.data_dir, "name_category_map.json")
    )
    all_scores_can = []
    all_preds_can = []
    pred_ids = []
    model.eval()
    for batch in batches:
        input_ids, token_type_ids, label_indices = batchify_fn(batch)
        input_ids = paddle.to_tensor(input_ids)
        token_type_ids = paddle.to_tensor(token_type_ids)
        logits = model(input_ids, token_type_ids)[0].numpy()
        for i, l in zip(label_indices, logits):
            score = l[i[0] : i[-1] + 1, vocab_ids]
            # Find topk candidates of scores and predicted indices.
            score_can, pred_id_can = find_topk(score, k=4, axis=-1)
            all_scores_can.extend([score_can.tolist()])
            all_preds_can.extend([pred_id_can.tolist()])
            pred_ids.extend([pred_id_can[:, 0].tolist()])
    results = []
    for i, d in enumerate(data):
        label = decode(pred_ids[i], id_vocabs)
        result = {
            "text": d,
            "label": label,
        }
        if label not in name_dict:
            scores_can = all_scores_can[i]
            pred_ids_can = all_preds_can[i]
            labels_can = search(scores_can, pred_ids_can, 0, [], 0)
            labels_can.sort(key=lambda d: -d[1])
            for labels in labels_can:
                cls_label_can = decode(labels[0], id_vocabs)
                if cls_label_can in name_dict:
                    result["label"] = cls_label_can
                    break
                else:
                    labels_can = bk_tree.search_similar_word(label)
                    if len(labels_can) != 0:
                        result["label"] = labels_can[0][0]
        if result["label"] in name_dict:
            result["category"] = name_dict[result["label"]]
        results.append(result)
    return results