code: def _get_queryset(klass):
      
      if isinstance(klass, QuerySet):
          return klass
      elif isinstance(klass, Manager):
          manager = klass
      elif isinstance(klass, ModelBase):
          manager = klass._default_manager
      else:
          if isinstance(klass, type):
              klass__name = klass.__name__
          else:
              klass__name = klass.__class__.__name__
          raise ValueError(
              "Object is of type '{}', but must be a Django Model, "
              "Manager, or QuerySet".format(klass__name)
          )
      return manager.all()
docs: Returns a QuerySet from a Model, Manager, or QuerySet. Created to make
      get_object_or_404 and get_list_or_404 more DRY.
  
      Raises a ValueError if klass is not a Model, Manager, or QuerySet.