      def name(self):
          # This ensures that we only called `__str__` lazily,
          # as in some cases calling __str__ on a model instances *might*
          # involve a database lookup.
          return six.text_type(self.obj)
  
      is_hyperlink = True
  
  
  @python_2_unicode_compatible
 
</s> remove @python_2_unicode_compatible
class PKOnlyObject(object):
 </s> add class PKOnlyObject: </s> remove         return unicode_to_repr(representation.field_repr(self))
 </s> add         return representation.field_repr(self) </s> remove         @python_2_unicode_compatible
        class MockLazyStr(object):
 </s> add         class MockLazyStr: </s> remove         request = super(ViewSetMixin, self).initialize_request(request, *args, **kwargs)
 </s> add         request = super().initialize_request(request, *args, **kwargs) </s> remove class Hyperlink(six.text_type):
 </s> add class Hyperlink(str):
        return str(self.obj)
      def name(self):
          # This ensures that we only called `__str__` lazily,
          # as in some cases calling __str__ on a model instances *might*
          # involve a database lookup.
        return str(self.obj)
  
      is_hyperlink = True
  
  
  @python_2_unicode_compatible
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/relations.py