def METHOD_NAME(self, loader_te, device, filename,
              metric_te,
              spliter="#"):
    """
    pred2file dump predicted label to file as sanity check
    """
    self.eval()
    model_local = self.to(device)
    logger = Logger.get_logger()
    for _, (x_s, y_s, *_, path4instance) in enumerate(loader_te):
        x_s, y_s = x_s.to(device), y_s.to(device)
        _, prob, *_ = model_local.infer_y_vpicn(x_s)
        list_pred_prob_list = prob.tolist()
        list_target_list = y_s.tolist()
        list_target_scalar = [np.asarray(label).argmax() for label in list_target_list]
        tuple_zip = zip(path4instance, list_target_scalar, list_pred_prob_list)
        list_pair_path_pred = list(tuple_zip)
        with open(filename, 'a', encoding="utf8") as handle_file:
            for list4one_obs_path_prob_target in list_pair_path_pred:
                list_str_one_obs_path_target_predprob = [
                    str(ele) for ele in list4one_obs_path_prob_target]
                str_line = (" "+spliter+" ").join(list_str_one_obs_path_target_predprob)
                str_line = str_line.replace("[", "")
                str_line = str_line.replace("]", "")
                print(str_line, file=handle_file)
    logger.info(f"prediction saved in file {filename}")
    file_acc = self.read_prediction_file(filename, spliter)
    acc_metric_te = metric_te['acc']
    flag1 = math.isclose(file_acc, acc_metric_te, rel_tol=1e-9, abs_tol=0.01)
    acc_raw1 = PerfClassif.cal_acc(self, loader_te, device)
    acc_raw2 = PerfClassif.cal_acc(self, loader_te, device)
    flag_raw_consistency = math.isclose(acc_raw1, acc_raw2, rel_tol=1e-9, abs_tol=0.01)
    flag2 = math.isclose(file_acc, acc_raw1, rel_tol=1e-9, abs_tol=0.01)
    if not (flag1 & flag2 & flag_raw_consistency):
        str_info = f"inconsistent acc:" \
                   f"prediction file acc {file_acc}" \
                   f"torchmetric acc {acc_metric_te}" \
                   f"raw acc 1 {acc_raw1}" \
                   f"raw acc 2 {acc_raw2}"
        raise RuntimeError(str_info)
    return file_acc