<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def anonymous_required(function):
 """Redirect to user profile if user is already logged-in"""


    def wrapper(*args, **kwargs):
        if args[0].user.is_authenticated():
            url = settings.ANONYMOUS_REQUIRED_REDIRECT_URL
            return HttpResponseRedirect(reverse(url))
        return function(*args, **kwargs)

    return wrapper