  from django.core.exceptions import ImproperlyConfigured
  from django.core.exceptions import ValidationError as DjangoValidationError
  from django.db import models
  from django.db.models.fields import FieldDoesNotExist
  from django.utils import six
  from django.utils.translation import ugettext_lazy as _
  from rest_framework.compat import OrderedDict
  from rest_framework.exceptions import ValidationError
  from rest_framework.fields import empty, set_value, Field, SkipField
  from rest_framework.settings import api_settings
 
</s> remove from rest_framework.compat import OrderedDict
from rest_framework.exceptions import ValidationError
from rest_framework.fields import empty, set_value, Field, SkipField
from rest_framework.settings import api_settings
from rest_framework.utils import html, model_meta, representation
 </s> add from rest_framework.utils import model_meta </s> remove from django.core.exceptions import ImproperlyConfigured
from django.core.exceptions import ValidationError as DjangoValidationError
 </s> add import warnings
 </s> remove `ModelSerializer` class and an equivelent explicit `Serializer` class.
 </s> add `ModelSerializer` class and an equivalent explicit `Serializer` class. </s> remove import copy
import inspect
import warnings
 </s> add  </s> remove             # Eg. Calling Model.clean() explictily inside Serializer.validate()
 </s> add             # Eg. Calling Model.clean() explicitly inside Serializer.validate()
  from django.core.exceptions import ImproperlyConfigured
  from django.core.exceptions import ValidationError as DjangoValidationError
  from django.db import models
  from django.db.models.fields import FieldDoesNotExist

  from django.utils.translation import ugettext_lazy as _
  from rest_framework.compat import OrderedDict
  from rest_framework.exceptions import ValidationError
  from rest_framework.fields import empty, set_value, Field, SkipField
  from rest_framework.settings import api_settings
keep keep keep keep replace keep keep keep keep keep
 Removed unused imports, pep8 fixes, typo fixes 
rest_framework/serializers.py