code: def save(self):
          
          headers = {}
          headers.setdefault('Content-Type', 'application/json')
          if not self.exists():
              self.create()
              return
          put_resp = self.r_session.put(
              self.document_url,
              data=self.json(),
              headers=headers
          )
          put_resp.raise_for_status()
          data = response_to_json_dict(put_resp)
          super(Document, self).__setitem__('_rev', data['rev'])
          return
docs: Saves changes made to the locally cached Document object's data
          structures to the remote database.  If the document does not exist
          remotely then it is created in the remote database.  If the object
          does exist remotely then the document is updated remotely.  In either
          case the locally cached Document object is also updated accordingly
          based on the successful response of the operation.