'Leave a swarm.
Args:
force (bool): Leave the swarm even if this node is a manager.
Default: ``False``
Returns:
``True`` if the request went through.
Raises:
:py:class:`docker.errors.APIError`
If the server returns an error.'

@utils.minimum_version('1.24')
def leave_swarm(self, force=False):

    url = self._url('/swarm/leave')
    response = self._post(url, params={'force': force})
    if (force and (response.status_code == http_client.NOT_ACCEPTABLE)):
        return True
    if (force and (response.status_code == http_client.SERVICE_UNAVAILABLE)):
        return True
    self._raise_for_status(response)
    return True
