<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_admin_url(self, query_params=None, use_path=False):
 """Returns the URL for viewing a FileNode in the admin."""


        if not query_params:
            query_params = {}

        url = ''
        if self.is_top_node():
            url = reverse('admin:media_tree_filenode_changelist');
        elif use_path and (self.is_folder() or self.pk):
            url = reverse('admin:media_tree_filenode_open_path', args=(self.get_path(),));
        elif self.is_folder():
            url = reverse('admin:media_tree_filenode_changelist');
            query_params['folder_id'] = self.pk
        elif self.pk:
            return reverse('admin:media_tree_filenode_change', args=(self.pk,));

        if len(query_params):
            params = ['%s=%s' % (key, value) for key, value in query_params.items()]
            url = '%s?%s' % (url, "&".join(params))

        return url