human
I wrote the below code

    if hasattr(request, '_messages'):
        return request._messages
    def get_user():
        if hasattr(request, 'user'):
            return request.user
        else:
            from django.contrib.auth.models import AnonymousUser
            return AnonymousUser()
    return lazy(memoize(get_user().get_and_delete_messages, {}, 0), list)()

What's a good function header?

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

def get_messages(request):