for k_cat in ec_data['k_cats']:
                k_cat['refs'] = [ec_data['refs'][ref_id] for ref_id in k_cat['ref_ids']]