def deprecated(func):
@functools.wraps(func)<EOL>def new_func(*args, **kwargs):<EOL><INDENT>warnings.simplefilter('<STR_LIT>', DeprecationWarning)  <EOL>warnings.warn("<STR_LIT>".format(func.__name__),<EOL>category=DeprecationWarning,<EOL>stacklevel=<NUM_LIT:2>)<EOL>warnings.simplefilter('<STR_LIT:default>', DeprecationWarning)  <EOL>return func(*args, **kwargs)<EOL><DEDENT>return new_func<EOL>
From https://stackoverflow.com/questions/2536307/how-do-i-deprecate-python-functions/30253848#30253848
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.