def get_filter_class(self, view, queryset=None):
        """
        Return the django-filters `FilterSet` used to filter the queryset.
        """
        filter_class = getattr(view, 'filter_class', None)
        if filter_class:
            filter_model = filter_class.Meta.model

            assert issubclass(queryset._document, filter_model), \
                'FilterSet model %s does not match queryset model %s' % \
                (filter_model, queryset.model)

            return filter_class
        return
Return the django-filters `FilterSet` used to filter the queryset.