code: def properties_mutator(cls, name, ioper=False):
      
  
      def wrapper(self, *args, **kwargs):
          """Mutate if not part of HasProperties; copy/modify/set otherwise"""
          if (
                  getattr(self, '_instance', None) is None or
                  getattr(self, '_name', '') == '' or
                  self is not getattr(self._instance, self._name)
          ):
              return getattr(super(cls, self), name)(*args, **kwargs)
          copy = cls(self)
          val = getattr(copy, name)(*args, **kwargs)
          if not ioper:
              setattr(self._instance, self._name, copy)
          self._instance = None
          self._name = ''
          return val
  
      wrapped = getattr(cls, name)
      wrapper.__name__ = wrapped.__name__
      wrapper.__doc__ = wrapped.__doc__
      return wrapper
docs: Wraps a mutating container method to add HasProperties notifications
  
      If the container is not part of a HasProperties instance, behavior
      is unchanged. However, if it is part of a HasProperties instance
      the new method calls set, triggering change notifications.