code: def deprecated(fun_name=None, msg=""):
      '''Issue a deprecation warning for a function'''
      def _deprecated(fun):
          '''Issue a deprecation warning for a function'''
          @wraps(fun)
          def _wrapper(*args, **kwargs):
              '''Issue deprecation warning and forward arguments to fun'''
              name = fun_name if fun_name is not None else fun.__name__
              _warn_deprecated('Call to deprecated function %s. %s' % (name, msg))
              return fun(*args, **kwargs)
  
          return _wrapper
  
      return _deprecatef deprecated(fun_name=None, msg=""):
      '''Issue a deprecation warning for a function'''
      def _deprecated(fun):
          '''Issue a deprecation warning for a function'''
          @wraps(fun)
          def _wrapper(*args, **kwargs):
              '''Issue deprecation warning and forward arguments to fun'''
              name = fun_name if fun_name is not None else fun.__name__
              _warn_deprecated('Call to deprecated function %s. %s' % (name, msg))
              return fun(*args, **kwargs)
  
          return _wrapper
  
      return _deprecated
docs: Issue a deprecation warning for a function