  import inspect
  
  from django.core.exceptions import ImproperlyConfigured
  from django.conf import settings
  from django.utils import six
  import django
  
  
 
</s> remove from rest_framework.compat import smart_text, urlparse
 </s> add from django.utils.encoding import smart_text
from rest_framework.compat import urlparse </s> remove from django.utils.encoding import iri_to_uri
 </s> add from django.utils.encoding import iri_to_uri, force_text
from django.utils.encoding import force_text
  import inspect
  
  from django.core.exceptions import ImproperlyConfigured
from django.utils.encoding import force_text
  from django.conf import settings
  from django.utils import six
  import django
  
  
keep keep add keep keep keep keep keep
 Removed custom StringIO, force_text, smart_text compat 
rest_framework/compat.py