def deprecated_function(func, warning=DEPRECATED_FUNCTION_WARNING):
@wraps(func)<EOL>def wrapped_func(*args, **kwargs):<EOL><INDENT>warnings.warn(<EOL>DEPRECATED_FUNCTION_WARNING.format(func),<EOL>category=DeprecationWarning,<EOL>stacklevel=<NUM_LIT:2>,<EOL>)<EOL>return func(*args, **kwargs)<EOL><DEDENT>return wrapped_func<EOL>
Adds a `DeprecationWarning` to a function

    Parameters
    ----------
    func : `callable`
        the function to decorate with a `DeprecationWarning`

    warning : `str`, optional
        the warning to present

    Notes
    -----
    The final warning message is formatted as ``warning.format(func)``
    so you can use attribute references to the function itself.
    See the default message as an example.