      def _proxy_class(self):
          return self._field.__class__
  
      def __repr__(self):
          return unicode_to_repr('<%s value=%s errors=%s>' % (
              self.__class__.__name__, self.value, self.errors
          ))
  
      def as_form_field(self):
          value = '' if (self.value is None or self.value is False) else self.value
 
</s> remove         ))
 </s> add         ) </s> remove         return unicode_to_repr('<%s(queryset=%s)>' % (
 </s> add         return '<%s(queryset=%s)>' % ( </s> remove         return unicode_to_repr('<%s(queryset=%s, fields=%s)>' % (
 </s> add         return '<%s(queryset=%s, fields=%s)>' % ( </s> remove         ))
 </s> add         ) </s> remove         return unicode_to_repr('<%s(queryset=%s, field=%s, date_field=%s)>' % (
 </s> add         return '<%s(queryset=%s, field=%s, date_field=%s)>' % (
        return '<%s value=%s errors=%s>' % (
      def _proxy_class(self):
          return self._field.__class__
  
      def __repr__(self):
        return '<%s value=%s errors=%s>' % (
              self.__class__.__name__, self.value, self.errors
          ))
  
      def as_form_field(self):
          value = '' if (self.value is None or self.value is False) else self.value
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/serializer_helpers.py