def retryable_writes_supported(self):
        """Checks if this server supports retryable writes."""
        return (
            self._ls_timeout_minutes is not None and
            self._server_type in (SERVER_TYPE.Mongos, SERVER_TYPE.RSPrimary))
Checks if this server supports retryable writes.
stackoverflow/venv/lib/python3.6/site-packages/pymongo/server_description.py