docs: def DeleteAttribute(self, attribute):
      """Clears the attribute from this object."""
      if "w" not in self.mode:
        raise IOError("Deleting attribute %s from read only object." % attribute)
  
      # Check if this object should be locked in order to delete the attribute.
      # NOTE: We don't care about locking when doing blind writes.
      if self.mode != "w" and attribute.lock_protected and not self.transaction:
        raise IOError("Object must be locked to delete attribute %s." % attribute)
  
      if attribute in self.synced_attributes:
        self._to_delete.add(attribute)
        del self.synced_attributes[attribute]
  
      if attribute in self.new_attributes:
        del self.new_attributes[attribute]
  
      # Does this represent a new version?
      if attribute.versioned and attribute.creates_new_object_version:
        self._new_version = True
  
      self._dirty = True