      def pygments_css(style):
          return None
  
  # `separators` argument to `json.dumps()` differs between 2.x and 3.x
  # See: http://bugs.python.org/issue22767
  if six.PY3:
      SHORT_SEPARATORS = (',', ':')
      LONG_SEPARATORS = (', ', ': ')
      INDENT_SEPARATORS = (',', ': ')
 
</s> remove     field = serializers.DateTimeField(default_timezone=pytz.timezone('America/New_York'))
 </s> add     class MockTimezone:
        @staticmethod
        def localize(value, is_dst):
            raise compat.InvalidTimeError()

        def __str__(self):
            return 'America/New_York'

    field = serializers.DateTimeField(default_timezone=MockTimezone()) </s> remove pytz==2016.10
 </s> add  </s> remove             except Exception:
 </s> add             except InvalidTimeError: </s> remove from rest_framework import serializers
 </s> add from rest_framework import compat, serializers </s> remove from django.utils.timezone import pytz, utc
 </s> add from django.utils.timezone import utc
try:
    import pytz
    from pytz.exceptions import InvalidTimeError
except ImportError:
    InvalidTimeError = Exception


      def pygments_css(style):
          return None
  
try:
    import pytz
    from pytz.exceptions import InvalidTimeError
except ImportError:
    InvalidTimeError = Exception


  # `separators` argument to `json.dumps()` differs between 2.x and 3.x
  # See: http://bugs.python.org/issue22767
  if six.PY3:
      SHORT_SEPARATORS = (',', ':')
      LONG_SEPARATORS = (', ', ': ')
      INDENT_SEPARATORS = (',', ': ')
keep keep add keep keep keep keep keep keep
 Added pytz exception in compat module.
Mock pytz.timezone localize in tests.
Ref: #4986 
rest_framework/compat.py