human
I wrote the below code

    def deprecate(obj, message=message, name=name, alternative=alternative, pending=pending, addendum=addendum):
        import textwrap
        if (not name):
            name = obj.__name__
        if isinstance(obj, type):
            obj_type = 'class'
            old_doc = obj.__doc__
            func = obj.__init__
            def finalize(wrapper, new_doc):
                try:
                    obj.__doc__ = new_doc
                except (AttributeError, TypeError):
                    pass
                obj.__init__ = wrapper
                return obj
        else:
            obj_type = 'function'
            if isinstance(obj, classmethod):
                func = obj.__func__
                old_doc = func.__doc__
                def finalize(wrapper, new_doc):
                    wrapper = functools.wraps(func)(wrapper)
                    wrapper.__doc__ = new_doc
                    return classmethod(wrapper)
            else:
                func = obj
                old_doc = func.__doc__
                def finalize(wrapper, new_doc):
                    wrapper = functools.wraps(func)(wrapper)
                    wrapper.__doc__ = new_doc
                    return wrapper
        message = _generate_deprecation_message(since, message, name, alternative, pending, obj_type, addendum)
        def wrapper(*args, **kwargs):
            warnings.warn(message, mplDeprecation, stacklevel=2)
            return func(*args, **kwargs)
        old_doc = textwrap.dedent((old_doc or '')).strip('\n')
        message = message.strip()
        new_doc = (('\n..    deprecated::    %(since)s\n                %(message)s\n\n' % {'since': since, 'message': message}) + old_doc)
        if (not old_doc):
            new_doc += '\\    '
        return finalize(wrapper, new_doc)
    return deprecate

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

def deprecated(since, message='', name='', alternative='', pending=False, obj_type=None, addendum=''):