code: func (cli *Client) negotiateAPIVersionPing(p types.Ping) {
  	// try the latest version before versioning headers existed
  	if p.APIVersion == "" {
  		p.APIVersion = "1.24"
  	}
  
  	// if the client is not initialized with a version, start with the latest supported version
  	if cli.version == "" {
  		cli.version = api.DefaultVersion
  	}
  
  	// if server version is lower than the client version, downgrade
  	if versions.LessThan(p.APIVersion, cli.version) {
  		cli.version = p.APIVersion
  	}
  
  	// Store the results, so that automatic API version negotiation (if enabled)
  	// won't be performed on the next request.
  	if cli.negotiateVersion {
  		cli.negotiated = true
  	}
  }
docs: // negotiateAPIVersionPing queries the API and updates the version to match the
  // API version. Any errors are silently ignored.