code: def deprecate(message):
      
      @decorator
      def decorate(fn, *args, **kw):
          warnings.warn(message, DeprecationWarning, 2)
          return fn(*args, **kw)
      return decorate
docs: Decorate a function to emit a deprecation warning with the given
          message.