code: def deprecated (func):
      
      def newfunc (*args, **kwargs):
          """Print deprecated warning and execute original function."""
          warnings.warn("Call to deprecated function %s." % func.__name__,
                        category=DeprecationWarning)
          return func(*args, **kwargs)
      return update_func_meta(newfunc, func)
docs: A decorator which can be used to mark functions as deprecated.
      It emits a warning when the function is called.