code: def update(old, new, collection, sneaky_update_filter=None):
      
      # need_save = something has changed
      need_save = False
  
      locked_fields = old.get('_locked_fields', [])
  
      for key, value in new.items():
  
          # don't update locked fields
          if key in locked_fields:
              continue
  
          if old.get(key) != value:
              if sneaky_update_filter and key in sneaky_update_filter:
                  if sneaky_update_filter[key](old[key], value):
                      old[key] = value
                      need_save = True
              else:
                  old[key] = value
                  need_save = True
  
          # remove old +key field if this field no longer has a +
          plus_key = '+%s' % key
          if plus_key in old:
              del old[plus_key]
              need_save = True
  
      if need_save:
          old['updated_at'] = datetime.datetime.utcnow()
          collection.save(old, safe=True)
  
      return need_save
docs: update an existing object with a new one, only saving it and
          setting updated_at if something has changed
  
          old
              old object
          new
              new object
          collection
              collection to save changed object to
          sneaky_update_filter
              a filter for updates to object that should be ignored
              format is a dict mapping field names to a comparison function
              that returns True iff there is a change