human
I wrote the below code

    @functools.wraps(func)
    def inner(*args, **kwargs):
        message = None
        for arg in args[:2]:
            if isinstance(arg, Message):
                message = arg
                break
        if (message is None):
            raise ValueError('channel_session    called    without    Message    instance')
        if hasattr(message, 'channel_session'):
            try:
                return func(*args, **kwargs)
            finally:
                if message.channel_session.modified:
                    message.channel_session.save()
        if (not message.reply_channel):
            raise ValueError(('No    reply_channel    sent    to    consumer.
   @channel_session    ' + 'can    only    be    used    on    messages    containing    it.'))
        session = session_for_reply_channel(message.reply_channel.name)
        if (not session.exists(session.session_key)):
            try:
                session.save(must_create=True)
            except CreateError:
                raise ConsumeLater()
        message.channel_session = session
        try:
            return func(*args, **kwargs)
        finally:
            if (session.modified and (not session.is_empty())):
                session.save()
    return inner

What's a good function header?

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

def channel_session(func):