<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def put_design(self, design_name, design, verbose=False):
 """ Updates a design document for the loaded databases design_name <str> name of the design design <str> json string of the design document """


    try:

      try:
        # check if there is a previous revision of the
        # specified design, if there is get the _rev
        # id from it and apply it to the new version
        existing = self.get_design(design_name)

        design = json.loads(design)

        if design.get("version") and existing.get("version") == design.get("version"):
          if verbose:
            print "No change in design... skipping update!"
          return

        design["_rev"] = existing["_rev"]
        design = json.dumps(design)
      except RESTException:
        pass

      r = requests.request(
        "PUT",
        "%s/%s/_design/%s" % (
          self.host,
          self.database_name,
          design_name
        ),
        auth=self.auth,
        data=design,
        headers={"content-type" : "application/json"}
      )

      return self.result(r.text)

    except:
      raise