def _get_queryset(klass):
    """
    Returns a SpecializedQuerySet from a BaseGeneralizedModel sub-class,
    SpecializationManager, or SpecializedQuerySet.

    """
    from djeneralize.manager import SpecializationManager
    from djeneralize.query import SpecializedQuerySet
    if isinstance(klass, SpecializedQuerySet):
        return klass
    elif isinstance(klass, SpecializationManager):
        manager = klass
    else:
        manager = klass._default_specialization_manager
    return manager.all()
