
def table_final(res):
    TASKS = ['STS-B', 'MRPC', 'SST-2',
             'QNLI', 'COLA', 'RTE',
             'MNLI_M', 'MNLI_MM', 'QQP']
    METHOD_LIST = [
        #'FIRSTX_NO_PRUNE',
        #'RANDOM',
        'ATT_ONLY',
        #'CLS_NO_DUMMY',
        #'KMEANSPLUS',
        'NEW_KMEANSPLUS'
        ]
    SPEEDUP = [1.5, 2, 3, 4]

    for idx, speedup in enumerate(SPEEDUP):
       print("speedup num", speedup)
       combine_res = []
       for method_name in METHOD_LIST:
           tmp = []
           for dataset in TASKS:
               tmp.append(np.round(res[dataset][method_name][idx],2))
           combine_res.append([method_name] + tmp)
       combine_res = pd.DataFrame(combine_res, columns=['method name']+TASKS)
       print(combine_res.to_latex(escape=False).replace('_', '\_'))

    return