<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mark_as_read(self, request, pk):
 """ Marks the considered forums as read. """

        if self.top_level_forum is not None:
            forums = request.forum_permission_handler.get_readable_forums(
                self.top_level_forum.get_descendants(include_self=True), request.user,
            )
        else:
            forums = request.forum_permission_handler.get_readable_forums(
                Forum.objects.all(), request.user,
            )

        # Marks forums as read
        track_handler.mark_forums_read(forums, request.user)

        if len(forums):
            messages.success(request, self.success_message)

        return HttpResponseRedirect(self.get_top_level_forum_url())