def deprecated(func):
def new_func(*args, **kwargs):<EOL><INDENT>warn("<STR_LIT>".format(func.__name__),<EOL>category=DeprecationWarning)<EOL>return func(*args, **kwargs)<EOL><DEDENT>new_func.__name__ = func.__name__<EOL>new_func.__doc__ = func.__doc__<EOL>new_func.__dict__.update(func.__dict__)<EOL>return new_func<EOL>
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.

    https://wiki.python.org/moin/PythonDecoratorLibrary#Generating_Deprecation_Warnings