      models.IntegerField, models.FloatField, models.DecimalField, models.DurationField,
  )
  
  
  class ClassLookupDict(object):
      """
      Takes a dictionary with classes as keys.
      Lookups against this object will traverses the object's inheritance
      hierarchy in method resolution order, and returns the first matching value
      from the dictionary or raises a KeyError if nothing matches.
 
</s> remove @python_2_unicode_compatible
class PKOnlyObject(object):
 </s> add class PKOnlyObject: </s> remove class BadType(object):
 </s> add class BadType: </s> remove class Hyperlink(six.text_type):
 </s> add class Hyperlink(str): </s> remove from django.utils.six.moves.urllib import parse as urlparse
 </s> add  </s> remove         return super(BaseSerializer, cls).__new__(cls, *args, **kwargs)
 </s> add         return super().__new__(cls, *args, **kwargs)
class ClassLookupDict:
      models.IntegerField, models.FloatField, models.DecimalField, models.DurationField,
  )
  
  
class ClassLookupDict:
      """
      Takes a dictionary with classes as keys.
      Lookups against this object will traverses the object's inheritance
      hierarchy in method resolution order, and returns the first matching value
      from the dictionary or raises a KeyError if nothing matches.
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/utils/field_mapping.py