human
Complete this python program:
def deprecated(**decorator_kwargs):
assistant
#Here is the Python code you requested.

    """This is a decorator which can be used to mark functions
    as deprecated. It will result in a warning being emitted
    when the function is used.
    """
    from sympy.utilities.exceptions import SymPyDeprecationWarning
    def _warn_deprecation(wrapped, stacklevel):
        decorator_kwargs.setdefault('feature', wrapped.__name__)
        SymPyDeprecationWarning(**decorator_kwargs).warn(stacklevel=stacklevel)
    def deprecated_decorator(wrapped):
        if hasattr(wrapped, '__mro__'):
            class wrapper(wrapped, ):
                __doc__ = wrapped.__doc__
                __name__ = wrapped.__name__
                __module__ = wrapped.__module__
                _sympy_deprecated_func = wrapped
                def __init__(self, *args, **kwargs):
                    _warn_deprecation(wrapped, 4)
                    super(wrapper, self).__init__(*args, **kwargs)
        else:
            @wraps(wrapped)
            def wrapper(*args, **kwargs):
                _warn_deprecation(wrapped, 3)
                return wrapped(*args, **kwargs)
            wrapper._sympy_deprecated_func = wrapped
        return wrapper
    return deprecated_decorator