def upload_data_to_tabs(nearest_labels, label_annotation, fields, state):
    assigned_tags = get_assigned_tags_names_by_label_annotation(label_annotation)
    update_review_tags_tab(assigned_tags, fields)
    update_card_buttons('lastAssignedTag', assigned_tags, fields, state)
    update_card_buttons('selectedDatabaseItem', assigned_tags, fields, state)
    nearest_labels = {key: value[0] for (key, value) in nearest_labels.items()}
    data_to_show = generate_data_to_show(nearest_labels)
    data_to_show = add_info_to_disable_buttons(data_to_show, assigned_tags, fields, state)
    data_to_show = convert_dict_to_list(data_to_show)
    data_to_show = sort_by_dist(data_to_show)
    fields['data.predicted'] = data_to_show
def upload_data_to_tabs(nearest_labels, label_annotation, fields, state):
    assigned_tags = get_assigned_tags_names_by_label_annotation(label_annotation)
    update_review_tags_tab(assigned_tags, fields)
    update_card_buttons('lastAssignedTag', assigned_tags, fields, state)
    update_card_buttons('selectedDatabaseItem', assigned_tags, fields, state)
    nearest_labels = {key: value[0] for (key, value) in nearest_labels.items()}
    data_to_show = generate_data_to_show(nearest_labels)
    data_to_show = add_info_to_disable_buttons(data_to_show, assigned_tags, fields, state)
    data_to_show = convert_dict_to_list(data_to_show)
    data_to_show = sort_by_dist(data_to_show)
    fields['data.predicted'] = data_to_show