          with self.assertNumQueries(2):
              qs = Author.objects.prefetch_related('addresses')
              addresses = [[six.text_type(address) for address in obj.addresses.all()]
                           for obj in qs]
          self.assertEqual(addresses, [[six.text_type(self.author_address)], [], []])
  
      def test_m2m(self):
          with self.assertNumQueries(3):
              qs = Author.objects.all().prefetch_related('favorite_authors', 'favors_me')
              favorites = [(
 
</s> remove             addresses = [[six.text_type(address) for address in obj.addresses.all()]
 </s> add             addresses = [[str(address) for address in obj.addresses.all()] </s> remove             addresses = [[six.text_type(address) for address in obj.addresses.all()] for obj in qs]
        self.assertEqual(addresses, [[six.text_type(self.author_address)], [], []])
 </s> add             addresses = [[str(address) for address in obj.addresses.all()] for obj in qs]
        self.assertEqual(addresses, [[str(self.author_address)], [], []]) </s> remove                 [six.text_type(i_like) for i_like in author.favorite_authors.all()],
                [six.text_type(likes_me) for likes_me in author.favors_me.all()]
 </s> add                 [str(i_like) for i_like in author.favorite_authors.all()],
                [str(likes_me) for likes_me in author.favors_me.all()] </s> remove         lst2 = [[six.text_type(book) for book in author.books_with_year.all()] for author in qs]
 </s> add         lst2 = [[str(book) for book in author.books_with_year.all()] for author in qs] </s> remove         lst2 = [[six.text_type(author) for author in book.aged_authors.all()] for book in qs]
 </s> add         lst2 = [[str(author) for author in book.aged_authors.all()] for book in qs]
        self.assertEqual(addresses, [[str(self.author_address)], [], []])
          with self.assertNumQueries(2):
              qs = Author.objects.prefetch_related('addresses')
              addresses = [[six.text_type(address) for address in obj.addresses.all()]
                           for obj in qs]
        self.assertEqual(addresses, [[str(self.author_address)], [], []])
  
      def test_m2m(self):
          with self.assertNumQueries(3):
              qs = Author.objects.all().prefetch_related('favorite_authors', 'favors_me')
              favorites = [(
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
tests/prefetch_related/tests.py