<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_and_redirect(request, notification_id):
 """ Marks the supplied notification as read and then redirects to the supplied URL from the ``next`` URL parameter. **IMPORTANT**: This is CSRF - unsafe method. Only use it if its okay for you to mark notifications \ as read without a robust check. :param request: HTTP request context. :param notification_id: ID of the notification to be marked a read. :returns: Redirect response to a valid target url. """

    notification_page = reverse('notifications:all')
    next_page = request.GET.get('next', notification_page)

    if is_safe_url(next_page):
        target = next_page
    else:
        target = notification_page
    try:
        user_nf = request.user.notifications.get(pk=notification_id)
        if not user_nf.read:
            user_nf.mark_as_read()
    except Notification.DoesNotExist:
        pass

    return HttpResponseRedirect(target)