def _delete_shape(api, task_id, label_id):
    anno_json = api.get(api.task_annotation_url(task_id)).json()
    shape = _find_shape(anno_json, label_id)
    if (shape is not None):
        del_json = {'version': 1, 'tags': [], 'shapes': [shape], 'tracks': []}
        del_url = (api.task_annotation_url(task_id) + '?action=delete')
        api.patch(del_url, json=del_json)
def _delete_shape(api, task_id, label_id):
    anno_json = api.get(api.task_annotation_url(task_id)).json()
    shape = _find_shape(anno_json, label_id)
    if (shape is not None):
        del_json = {'version': 1, 'tags': [], 'shapes': [shape], 'tracks': []}
        del_url = (api.task_annotation_url(task_id) + '?action=delete')
        api.patch(del_url, json=del_json)