def _get_queryset(klass):
    """Return a QuerySet or a Manager."""
    # If it is a model class or anything else with ._default_manager
    if hasattr(klass, '_default_manager'):
        return klass._default_manager.all()
    return klass