descendants_keys = [book.pk for book in Book.tagged.with_any(l_tags)]
if descendants_keys:
books = books.exclude(pk__in=descendants_keys)
descendants_keys = [book.pk for book in Book.tagged.with_any(l_tags)]
if descendants_keys:
books = books.exclude(pk__in=descendants_keys)