  from django import template
  from django.core.urlresolvers import reverse
  from django.http import QueryDict
  from django.utils.encoding import force_unicode
  from django.utils.html import escape
  from django.utils.safestring import SafeData, mark_safe
  from urlparse import urlsplit, urlunsplit
  import re
  import string
 
</s> remove from urlparse import urlsplit, urlunsplit
 </s> add try:
    from urllib.parse import urlsplit, urlunsplit
except ImportError:
    from urlparse import urlsplit, urlunsplit </s> remove from django.utils.encoding import is_protected_type, smart_unicode
 </s> add from django.utils.encoding import is_protected_type
try:
    from django.utils.encoding import smart_text
except ImportError:
    from django.utils.encoding import smart_unicode as smart_text </s> remove from django.utils.encoding import smart_unicode
 </s> add try:
    from django.utils.encoding import smart_text
except ImportError:
    from django.utils.encoding import smart_unicode as smart_text </s> remove from urlparse import urlparse
 </s> add try:
    from urllib.parse import urlparse
except ImportError:
    from urlparse import urlparse </s> remove from django.utils.encoding import smart_unicode, DjangoUnicodeDecodeError
 </s> add from django.utils.encoding import DjangoUnicodeDecodeError
try:
    from django.utils.encoding import smart_text
except ImportError:
    from django.utils.encoding import smart_unicode as smart_text
try:
    from django.utils.encoding import force_text
except ImportError:
    from django.utils.encoding import force_unicode as force_text
  from django import template
  from django.core.urlresolvers import reverse
  from django.http import QueryDict
try:
    from django.utils.encoding import force_text
except ImportError:
    from django.utils.encoding import force_unicode as force_text
  from django.utils.html import escape
  from django.utils.safestring import SafeData, mark_safe
  from urlparse import urlsplit, urlunsplit
  import re
  import string
keep keep keep replace keep keep keep keep keep
 First passing test under p3k \o/ 
rest_framework/templatetags/rest_framework.py