def METHOD_NAME(client):
    task = client.delete_tasks({"statuses": ["succeeded", "failed", "canceled"]})
    client.wait_for_task(task.task_uid)
    tasks_after = client.get_tasks()
    assert isinstance(task, TaskInfo)
    assert task.task_uid is not None
    assert task.index_uid is None
    assert task.type == "taskDeletion"
    assert len(tasks_after.results) >= 1
    assert (
        "statuses=succeeded%2Cfailed%2Ccanceled" in tasks_after.results[0].details["originalFilter"]
    )