code: def require_editable(f):
      
  
      def wrapper(self, *args, **kwargs):
          if not self._edit:
              raise RegistryKeyNotEditable("The key is not set as editable.")
          return f(self, *args, **kwargs)
  
      return wrapper
docs: Makes sure the registry key is editable before trying to edit it.