def kwargs_api_change(old_name, new_name=None):

    def wrapper(func):
        @functools.wraps(func)
        def new_func(*args, **kwargs):

            if old_name in kwargs:
                if new_name is None:
                    warning_string = 'Using deprecated keyword argument `%s` in function `%s`. ' \
                                 'This keyword is no longer supported, please don`t use it ' \
                                 'anymore.' % (old_name, func.__name__)
                else:
                    warning_string = 'Using deprecated keyword argument `%s` in function `%s`, ' \
                                 'please use keyword `%s` instead.' % \
                                 (old_name, func.__name__, new_name)
                warnings.warn(warning_string, category=DeprecationWarning)
                value = kwargs.pop(old_name)
                if new_name is not None:
                    kwargs[new_name] = value

            return func(*args, **kwargs)

        return new_func

    return wrapper
Return the savings that will be realized by subroutinizing
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/utils/decorators.py/kwargs_api_change--crossover with--dataset/ETHPy150Open googlei18n/compreffor/compreffor/pyCompressor.py/CandidateSubr.subr_saving