def _is_supported_score(
    pred_tokens: List[int], pred_log_probs_dict: List[Dict[str, float]]
) -> float:
    """
    Compute support score.

    Args:
        pred_tokens (List[int]): List of predicted tokens
        pred_log_probs_dict (List[Dict[str, float]]): log probabilities of tokens for each predicted tokens

    Returns:
        float: support score

    """
    isSup_score = 0
    groundness_token_appear_id = -1
    for tok_idx, token in enumerate(pred_tokens):
        if token in _GROUND_TOKENS:
            groundness_token_appear_id = tok_idx
            break
    if groundness_token_appear_id > -1:
        grd_score_dict = {}
        for token in _GROUND_TOKENS:
            prob = pred_log_probs_dict[groundness_token_appear_id][token]
            grd_score_dict[token] = np.exp(float(prob))
        isSup_score = (
            grd_score_dict["[Fully supported]"]
            + 0.5 * grd_score_dict["[Partially supported]"]
        ) / np.sum(list(grd_score_dict.values()))
    return isSup_score

    Compute support score.

    Args:
        pred_tokens (List[int]): List of predicted tokens
        pred_log_probs_dict (List[Dict[str, float]]): log probabilities of tokens for each predicted tokens

    Returns:
        float: support score

    
llama-index-packs/llama-index-packs-self-rag/llama_index/packs/self_rag/base.py