def make_qid_to_has_ans(dataset):
    r"""
    Pick all the questions which has answer in the dataset and return the list.
    """
    qid_to_has_ans = {}
    for domain in dataset:
        for w in domain['websites']:
            for qa in w['qas']:
                qid_to_has_ans[qa['id']] = bool(qa['answers'])
    return qid_to_has_ans

    Pick all the questions which has answer in the dataset and return the list.
    
markuplm/examples/fine_tuning/run_websrc/utils_evaluate.py