<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def redirect_ext(to, params_=None, anchor_=None, permanent_=False, args=None, kwargs=None):
 """ Advanced redirect which can includes GET-parameters and anchor. """

    if permanent_:
        redirect_class = HttpResponsePermanentRedirect
    else:
        redirect_class = HttpResponseRedirect
    return redirect_class(resolve_url_ext(to, params_, anchor_, args, kwargs))