human
Complete this python program:
def channel_and_http_session_user_from_http(func):
assistant
#Here is the Python code you requested.

    """Decorator that automatically transfers the user from HTTP sessions to
    channel-based sessions, rehydrates the HTTP session, and returns the
    user as message.user as well.
    """
    @http_session_user
    @channel_and_http_session
    @functools.wraps(func)
    def inner(message, *args, **kwargs):
        if (message.http_session is not None):
            transfer_user(message.http_session, message.channel_session)
        return func(message, *args, **kwargs)
    return inner