'Parse an ismaster response from the server.'

def __init__(self, doc):

    self._server_type = _get_server_type(doc)
    self._doc = doc
    self._is_writable = (self._server_type in (SERVER_TYPE.RSPrimary, SERVER_TYPE.Standalone, SERVER_TYPE.Mongos))
    self._is_readable = ((self.server_type == SERVER_TYPE.RSSecondary) or self._is_writable)
