code: def setonce(decorator):
      
      def decorate(fn, *args, **kwargs):
          parent = decorator(fn, *args, **kwargs)
          #doc = _add_msg(getattr(parent, '__doc__', None), '*@setonce*')
          doc = getattr(parent, '__doc__', None)
          assert hasattr(parent, "__set__") # don't use for non-data descriptors!
          return _setonce(fn.__name__, parent, doc)
      return decorate
docs: A descriptor modifier which allows __set__ to be called at most once.