code: func (cli *Client) legacyContainerWait(ctx context.Context, containerID string) (<-chan container.ContainerWaitOKBody, <-chan error) {
  	resultC := make(chan container.ContainerWaitOKBody)
  	errC := make(chan error)
  
  	go func() {
  		resp, err := cli.post(ctx, "/containers/"+containerID+"/wait", nil, nil, nil)
  		if err != nil {
  			errC <- err
  			return
  		}
  		defer ensureReaderClosed(resp)
  
  		var res container.ContainerWaitOKBody
  		if err := json.NewDecoder(resp.body).Decode(&res); err != nil {
  			errC <- err
  			return
  		}
  
  		resultC <- res
  	}()
  
  	return resultC, errC
  }
docs: // legacyContainerWait returns immediately and doesn't have an option to wait
  // until the container is removed.