def METHOD_NAME(d,dataset_name,passages_dict=None,test=False):
    p_d = {}
    p_d['question'] = d['question']
    p_d['question_id'] = d['question_id']
    if not test:
        p_d['answer-text'] = d['answer-text']
    if dataset_name == 'ottqa':
        p_d['table'],p_d['table_row_passages'] = fetch_ottqa_passages(d,passages_dict)
    else:
        p_d['table'] = fetch_table(d['table_id'])
    p_d['table_id'] = d['table_id']
    return p_d