              try:
                  field = model._meta.get_field(source)
                  if isinstance(field, DjangoModelField):
                      model_fields[source] = field
              except FieldDoesNotExist:
                  pass
  
          return model_fields
  
      # Determine the validators to apply...
  
 
</s> remove             try:
 </s> add             with contextlib.suppress(FieldDoesNotExist): </s> remove         except KeyError:
            pass
 </s> add  </s> remove             except AttributeError:
                pass

 </s> add  </s> remove             try:
 </s> add             with contextlib.suppress(AttributeError): </s> remove                 except (ValueError, TypeError):
                    pass
            else:
                try:
                    parsed = self.datetime_parser(value, input_format)
                    return self.enforce_timezone(parsed)
                except (ValueError, TypeError):
                    pass
 </s> add                 parsed = self.datetime_parser(value, input_format)
                return self.enforce_timezone(parsed)
              try:
                  field = model._meta.get_field(source)
                  if isinstance(field, DjangoModelField):
                      model_fields[source] = field


  
          return model_fields
  
      # Determine the validators to apply...
  
keep keep keep keep replace replace keep keep keep keep keep
 Refactor: Replace try/except with contextlib.suppress() (#8676) 
rest_framework/serializers.py