human
I wrote the below code

    method_types = (classmethod, staticmethod, types.MethodType)
    def deprecate_doc(old_doc, message):
        '\n                                Returns    a    given    docstring    with    a    deprecation    message    prepended\n                                to    it.\n                                '
        if (not old_doc):
            old_doc = ''
        old_doc = textwrap.dedent(old_doc).strip('\n')
        new_doc = ('\n..    deprecated::    {since}\n                {message}\n\n'.format(**{'since': since, 'message': message.strip()}) + old_doc)
        if (not old_doc):
            new_doc += '\\    '
        return new_doc
    def get_function(func):
        '\n                                Given    a    function    or    classmethod    (or    other    function    wrapper    type),    get\n                                the    function    object.\n                                '
        if isinstance(func, method_types):
            func = func.__func__
        return func
    def deprecate_function(func, message):
        '\n                                Returns    a    wrapped    function    that    displays    an\n                                ``AstropyDeprecationWarning``    when    it    is    called.\n                                '
        if isinstance(func, method_types):
            func_wrapper = type(func)
        else:
            func_wrapper = (lambda f: f)
        func = get_function(func)
        def deprecated_func(*args, **kwargs):
            if pending:
                category = AstropyPendingDeprecationWarning
            else:
                category = AstropyDeprecationWarning
            warnings.warn(message, category, stacklevel=2)
            return func(*args, **kwargs)
        if (type(func) is not type(str.__dict__['__add__'])):
            deprecated_func = functools.wraps(func)(deprecated_func)
        deprecated_func.__doc__ = deprecate_doc(deprecated_func.__doc__, message)
        return func_wrapper(deprecated_func)
    def...

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):