code: def save(self, force_insert=False, force_update=False):
          
          if force_insert and force_update:
              raise ValueError("Cannot force both insert and updating in resource saving.")
  
          data = {}
  
          for name, field in self._meta.fields.items():
              if field.serialize:
                  data[name] = field.dehydrate(getattr(self, name, None))
  
          insert = True if force_insert or self.resource_uri is None else False
  
          if insert:
              resp = self._meta.api.http_resource("POST", self._meta.resource_name, data=self._meta.api.resource_serialize(data))
          else:
              resp = self._meta.api.http_resource("PUT", self.resource_uri, data=self._meta.api.resource_serialize(data))
  
          if "Location" in resp.headers:
              resp = self._meta.api.http_resource("GET", resp.headers["Location"])
          elif resp.status_code == 204:
              resp = self._meta.api.http_resource("GET", self.resource_uri)
          else:
              return
  
          data = self._meta.api.resource_deserialize(resp.text)
  
          # Update local values from the API Response
          self.__init__(**data)
docs: Saves the current instance. Override this in a subclass if you want to
          control the saving process.
  
          The 'force_insert' and 'force_update' parameters can be used to insist
          that the "save" must be a POST or PUT respectively. Normally, they
          should not be set.