code: def retryable_writes_supported(self):
          
          return (
              self._ls_timeout_minutes is not None and
              self._server_type in (SERVER_TYPE.Mongos, SERVER_TYPE.RSPrimary))
docs: Checks if this server supports retryable writes.