code: func NoTasks(ctx context.Context, client client.ServiceAPIClient) func(log poll.LogT) poll.Result {
  	return func(log poll.LogT) poll.Result {
  		tasks, err := client.TaskList(ctx, types.TaskListOptions{})
  		switch {
  		case err != nil:
  			return poll.Error(err)
  		case len(tasks) == 0:
  			return poll.Success()
  		default:
  			return poll.Continue("waiting for all tasks to be removed: task count at %d", len(tasks))
  		}
  	}
  }
docs: // NoTasks verifies that all tasks are gone