human
Complete the below
def http_session_user(func):

    ''''Wraps a HTTP or WebSocket consumer (or any consumer of messages
    that provides a "COOKIES" attribute) to provide both a "session"
    attribute and a "user" attibute, like AuthMiddleware does.
    This runs http_session() to get a session to hook auth off of.
    If the user does not have a session cookie set, both "session"
    and "user" will be None.'
    '''
 Can you provide a the Python program you requested?
assistant
#Here is the Python program you requested.
    @http_session
    @functools.wraps(func)
    def inner(message, *args, **kwargs):
        if (not hasattr(message, 'http_session')):
            raise ValueError('Did    not    see    a    http    session    to    get    auth    from')
        if (message.http_session is None):
            from django.contrib.auth.models import AnonymousUser
            message.user = AnonymousUser()
        else:
            fake_request = type('FakeRequest', (object,), {'session': message.http_session})
            message.user = auth.get_user(fake_request)
        return func(message, *args, **kwargs)
    return inner