<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rebuild_tree(modeladmin, request, queryset=None):
 """ Rebuilds whole tree in database using `parent` link. """

    tree = FileNode.tree.rebuild()
    messages.success(request, message=_('The node tree was rebuilt.'))
    return HttpResponseRedirect('')