code: def deprecated(
      message,
      *,
      deprecated_since_version,
      active_deprecations_target,
      stacklevel=3,
  ):
      '''
      Mark a function as deprecated.
  
      This decorator should be used if an entire function or class is
      deprecated. If only a certain functionality is deprecated, you should use
      :func:`~.warns_deprecated_sympy` directly. This decorator is just a
      convenience. There is no functional difference between using this
      decorator and calling ``warns_deprecated_sympy()`` at the top of the
      function.
  
      The decorator takes the same arguments as
      :func:`~.warns_deprecated_sympy`. See its
      documentation for details on what the keywords to this decorator do.
  
      See the :ref:`deprecation-policy` document for details on when and how
      things should be deprecated in SymPy.
  
      Examples
      ========
  
      >>> from sympy.utilities.decorator import deprecated
      >>> from sympy import simplify
      >>> @deprecated("""\
      ... The simplify_this(expr) function is deprecated. Use simplify(expr)
      ... instead.""", deprecated_since_version="1.1",
      ... active_deprecations_target='simplify-this-deprecation')
      ... def simplify_this(expr):
      ...     """
      ...     Simplify ``expr``.
      ...
      ...     .. deprecated:: 1.1
      ...
      ...        The ``simplify_this`` function is deprecated. Use :func:`simplify`
      ...        instead. See its documentation for more information. See
      ...        :ref:`simplify-this-deprecation` for details.
      ...
      ...     """
      ...     return simplify(expr)
      >>> from sympy.abc import x
      >>> simplify_this(x*(x + 1) - x**2) # doctest: +SKIP
      <stdin>:1: SymPyDeprecationWarning:
      <BLANKLINE>
      The simplify_this(expr) function is deprecated. Use simplify(expr)
      instead.
      <BLANKLINE>
      See https://docs.sympy.org/latest/explanation/active-deprecations.html#simplify-this-deprecation
      for details.
      <BLANKLINE>
      This has been deprecated since SymPy version 1.1. It
      will be removed in a future version of SymPy.
      <BLANKLINE>
        simplify_this(x)
      x
  
      See Also
      ========
      sympy.utilities.exceptions.SymPyDeprecationWarning
      sympy.utilities.exceptions.sympy_deprecation_warning
      sympy.utilities.exceptions.ignore_warnings
      sympy.testing.pytest.warns_deprecated_sympy
  
      '''
      decorator_kwargs = {
          "deprecated_since_version": deprecated_since_version,
          "active_deprecations_target": active_deprecations_target,
      }
  
      def deprecated_decorator(wrapped):
          if hasattr(wrapped, "__mro__"):  # wrapped is actually a class
  
              class wrapper(wrapped):
                  __doc__ = wrapped.__doc__
                  __module__ = wrapped.__module__
                  _sympy_deprecated_func = wrapped
                  if "__new__" in wrapped.__dict__:
  
                      def __new__(cls, *args, **kwargs):
                          sympy_deprecation_warning(
                              message,
                              **decorator_kwargs,
                              stacklevel=stacklevel,
                          )
                          return super().__new__(cls, *args, **kwargs)
  
                  else:
  
                      def __init__(self, *args, **kwargs):
                          sympy_deprecation_warning(
                              message,
                              **decorator_kwargs,
                              stacklevel=stacklevel,
                          )
                          super().__init__(*args, **kwargs)
  
              wrapper.__name__ = wrapped.__name__
          else:
  
              @wraps(wrapped)
              def wrapper(*args, **kwargs):
                  sympy_deprecation_warning(
                      message, **decorator_kwargs, stacklevel=stacklevel
                  )
                  return wrapped(*args, **kwargs)
  
              wrapper._sympy_deprecated_func = wrapped
          return wrapper
  
      return deprecated_decorator
  
file_path: sympy/sympy/utilities/decorator.py
imports: import sys
  import types
  import inspect
  from functools import wraps, update_wrapper
  from sympy.utilities.exceptions import sympy_deprecation_warning
label_desc: Use image node_id 8 for calling a global function with example usage: deprecated(message) and returns: deprecated_decorator, wrapper, wrapped, super