def _get_label(api, task_id, label=None):
    (attr_id_map, class_id_map) = api._get_attr_class_maps(task_id)
    if isinstance(label, str):
        label = class_id_map[label]
    else:
        label = list(class_id_map.values())[0]
    return label
def _get_label(api, task_id, label=None):
    (attr_id_map, class_id_map) = api._get_attr_class_maps(task_id)
    if isinstance(label, str):
        label = class_id_map[label]
    else:
        label = list(class_id_map.values())[0]
    return label