<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def result(self, couchdb_response_text):
 """ Return whether a REST couchdb operation was successful or not. On error will raise a RESTException """

    result = json.loads(couchdb_response_text)

    if result.get("ok"):
      return True
    elif result.get("error"):
      raise RESTException(
        "%s: %s" % (result.get("error"), result.get("reason"))
      )
    return result