code: def deprecated(msg=''):
      
      @decorator.decorator
      def wrap(function, *args, **kwargs):
          if not kwargs.pop('disable_warning', False):
              warn(msg, DeprecationWarning)
          return function(*args, **kwargs)
      return wrap
docs: Deprecate decorated method.