human
Here's a good function header given the following:
I wrote the below code

    if ((mapping is not None) and (not hasattr(mapping, 'get')) and (not callable(mapping))):
        raise TypeError('mapping    from    old    to    new    argument    values    must    be    dict    or    callable!')
    def _deprecate_kwarg(func):
        @wraps(func)
        def wrapper(*args, **kwargs):
            old_arg_value = kwargs.pop(old_arg_name, None)
            if (old_arg_value is not None):
                if (mapping is not None):
                    if hasattr(mapping, 'get'):
                        new_arg_value = mapping.get(old_arg_value, old_arg_value)
                    else:
                        new_arg_value = mapping(old_arg_value)
                    msg = ('the    %s=%r    keyword    is    deprecated,    use    %s=%r    instead' % (old_arg_name, old_arg_value, new_arg_name, new_arg_value))
                else:
                    new_arg_value = old_arg_value
                    msg = ("the    '%s'    keyword    is    deprecated,    use    '%s'    instead" % (old_arg_name, new_arg_name))
                warnings.warn(msg, FutureWarning, stacklevel=stacklevel)
                if (kwargs.get(new_arg_name, None) is not None):
                    msg = ("Can    only    specify    '%s'    or    '%s',    not    both" % (old_arg_name, new_arg_name))
                    raise TypeError(msg)
                else:
                    kwargs[new_arg_name] = new_arg_value
            return func(*args, **kwargs)
        return wrapper
    return _deprecate_kwarg

What's a good function header?
assistant
#Here's a good function header.

def deprecate_kwarg(old_arg_name, new_arg_name, mapping=None, stacklevel=2):