code: def WriteHuntObject(self, hunt_obj):
      
      if hunt_obj.hunt_id in self.hunts:
        raise db.DuplicatedHuntError(hunt_id=hunt_obj.hunt_id)
  
      clone = self._DeepCopy(hunt_obj)
      clone.create_time = rdfvalue.RDFDatetime.Now()
      clone.last_update_time = rdfvalue.RDFDatetime.Now()
      self.hunts[(hunt_obj.hunt_id)] = clone
docs: Writes a hunt object to the database.