def serve_protected_file(request, path):
    try:
        file_obj = File.objects.get(file=path, is_public=False)
    except File.DoesNotExist:
        raise Http404('File not found')
    if not file_obj.has_read_permission(request):
        if settings.DEBUG:
            raise PermissionDenied
        else:
            raise Http404('File not found')
    return server.serve(request, file_obj=file_obj.file, save_as=False)
_algos.groupsort_indexer implements `counting sort` and it is at least
dataset/ETHPy150Open divio/django-filer/filer/server/views.py/serve_protected_file--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/core/groupby.py/_get_group_index_sorter