code: func (daemon *Daemon) WaitForDetachment(ctx context.Context, networkName, networkID, taskID, containerID string) error {
  	if daemon.clusterProvider == nil {
  		return fmt.Errorf("cluster provider is not initialized")
  	}
  
  	return daemon.clusterProvider.WaitForDetachment(ctx, networkName, networkID, taskID, containerID)
  }
docs: // WaitForDetachment makes the cluster manager wait for detachment of
  // the container from the network.