  from django.core.exceptions import ImproperlyConfigured
  from django.core.urlresolvers import NoReverseMatch
  from rest_framework import views
  from rest_framework.response import Response
  from rest_framework.reverse import reverse
  from rest_framework.urlpatterns import format_suffix_patterns
  
  
 
</s> remove                 ret = OrderedDict()
 </s> add                 ret = SortedDict() </s> remove         api_root_dict = OrderedDict()
 </s> add         api_root_dict = SortedDict() </s> remove from collections import namedtuple, OrderedDict
 </s> add from collections import namedtuple
from django.utils.datastructures import SortedDict
  from django.core.exceptions import ImproperlyConfigured
  from django.core.urlresolvers import NoReverseMatch
from django.utils.datastructures import SortedDict
  from rest_framework import views
  from rest_framework.response import Response
  from rest_framework.reverse import reverse
  from rest_framework.urlpatterns import format_suffix_patterns
  
  
keep add keep keep keep keep keep keep
 Used Django utils SortedDict instead of stdlib's OrderedDict for
wider compatability. 
rest_framework/routers.py