code: def _preserve_settings(method: T.Callable) -> T.Callable:
      
  
      @functools.wraps(method)
      def _wrapper(
              old: "ObservableProperty", handler: T.Callable
      ) -> "ObservableProperty":
          new = method(old, handler)  # type: ObservableProperty
          new.event = old.event
          new.observable = old.observable
          return new
  
      return _wrapper
docs: Decorator that ensures ObservableProperty-specific attributes
      are kept when using methods to change deleter, getter or setter.