def clean_username(self, username, request):
        backend_str = request.session[auth.BACKEND_SESSION_KEY]
        backend = auth.load_backend(backend_str)
        try:
            username = backend.clean_username(username)
        except AttributeError:  # Backend has no clean_username method.
            pass
        return username
Allows the backend to clean the username, if the backend defines a
dataset/ETHPy150Open django/django/django/contrib/auth/middleware.py/RemoteUserMiddleware.clean_username