  
  from django import template
  from django.template import loader
  from django.urls import NoReverseMatch, reverse
  from django.utils import six
  from django.utils.encoding import force_text, iri_to_uri
  from django.utils.html import escape, format_html, smart_urlquote
  from django.utils.safestring import SafeData, mark_safe
  
  from rest_framework.compat import apply_markdown, pygments_highlight
 
</s> remove from django.utils import six
 </s> add  </s> remove from __future__ import absolute_import, unicode_literals

 </s> add  </s> remove from django.utils import six
 </s> add  </s> remove from django.utils import six
 </s> add  </s> remove from django.utils.six.moves.urllib import parse as urlparse
 </s> add 
  
  from django import template
  from django.template import loader
  from django.urls import NoReverseMatch, reverse

  from django.utils.encoding import force_text, iri_to_uri
  from django.utils.html import escape, format_html, smart_urlquote
  from django.utils.safestring import SafeData, mark_safe
  
  from rest_framework.compat import apply_markdown, pygments_highlight
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
rest_framework/templatetags/rest_framework.py