import copy


def revise_unanswerable(preds, na_probs, na_prob_thresh):
    """
    Revise the predictions results and return a null string for unanswerable question
    whose unanswerable probability above the threshold.

    Parameters
    ----------
    preds: dict
        A dictionary of full prediction of spans
    na_probs: dict
        A dictionary of unanswerable probabilities
    na_prob_thresh: float
        threshold of the unanswerable probability

    Returns
    -------
    revised: dict
        A dictionary of revised prediction
    """
    revised = copy.deepcopy(preds)
    for q_id in na_probs.keys():
        if na_probs[q_id] > na_prob_thresh:
            revised[q_id] = ""
    return revised