docs: def _queryset_iterator(qs):
      """
      Override default iterator to wrap returned items in a publishing
      sanity-checker "booby trap" to lazily raise an exception if DRAFT
      items are mistakenly returned and mis-used in a public context
      where only PUBLISHED items should be used.
  
      This booby trap is added when all of:
  
      - the publishing middleware is active, and therefore able to report
      accurately whether the request is in a drafts-permitted context
      - the publishing middleware tells us we are not in
      a drafts-permitted context, which means only published items
      should be used.
      """
      # Avoid double-processing draft items in our custom iterator when we
      # are in a `PublishingQuerySet` that is also a subclass of the
      # monkey-patched `UrlNodeQuerySet`
      if issubclass(type(qs), UrlNodeQuerySet):
          super_without_boobytrap_iterator = super(UrlNodeQuerySet, qs)
      else:
          super_without_boobytrap_iterator = super(PublishingQuerySet, qs)
  
      if is_publishing_middleware_active() \
              and not is_draft_request_context():
          for item in super_without_boobytrap_iterator.iterator():
              if getattr(item, 'publishing_is_draft', False):
                  yield DraftItemBoobyTrap(item)
              else:
                  yield item
      else:
          for item in super_without_boobytrap_iterator.iterator():
              yield item