              if relation_info.to_many and (field_name in validated_attrs):
                  many_to_many[field_name] = validated_attrs.pop(field_name)
  
          try:
              instance = ModelClass.objects.create(**validated_attrs)
          except TypeError as exc:
              msg = (
                  'Got a `TypeError` when calling `%s.objects.create()`. '
                  'This may be because you have a writable field on the '
                  'serializer class that is not a valid argument to '
 
</s> remove             if relation_info.to_many and (field_name in validated_attrs):
                many_to_many[field_name] = validated_attrs.pop(field_name)
 </s> add             if relation_info.to_many and (field_name in validated_data):
                many_to_many[field_name] = validated_data.pop(field_name) </s> remove     def update(self, instance, validated_attrs):
 </s> add     def update(self, instance, validated_data): </s> remove             example_relationship = validated_attrs.pop('example_relationship')
            instance = ExampleModel.objects.create(**validated_attrs)
 </s> add             example_relationship = validated_data.pop('example_relationship')
            instance = ExampleModel.objects.create(**validated_data) </s> remove         # Remove many-to-many relationships from validated_attrs.
 </s> add         # Remove many-to-many relationships from validated_data. </s> remove     def create(self, validated_attrs):
 </s> add     def create(self, validated_data):
            instance = ModelClass.objects.create(**validated_data)
              if relation_info.to_many and (field_name in validated_attrs):
                  many_to_many[field_name] = validated_attrs.pop(field_name)
  
          try:
            instance = ModelClass.objects.create(**validated_data)
          except TypeError as exc:
              msg = (
                  'Got a `TypeError` when calling `%s.objects.create()`. '
                  'This may be because you have a writable field on the '
                  'serializer class that is not a valid argument to '
keep keep keep keep replace keep keep keep keep keep
 Renamed validated_attrs to validated_data to be more in line with other similar code. 
rest_framework/serializers.py