human
Complete this python program:
def login_required(f):
assistant
#Here is the Python program you requested.

    """èŠæ±ç»åœçdecorator
    :param f: åœæ°
    :return:
    """
    def _wrapper(request, *args, **kwargs):
        user = request.user
        if (not user.is_authenticated()):
            return redirect(('%s?next=%s' % (settings.LOGIN_URL, request.path)))
        else:
            return f(request, *args, **kwargs)
    return _wrapper