                  setattr(instance, field_name, value)
  
          return instance
  
      def update(self, instance, validated_attrs):
          assert not any(
              isinstance(field, BaseSerializer) and not field.read_only
              for field in self.fields.values()
          ), (
              'The `.update()` method does not suport nested writable fields '
 
</s> remove             instance = ModelClass.objects.create(**validated_attrs)
 </s> add             instance = ModelClass.objects.create(**validated_data) </s> remove         for attr, value in validated_attrs.items():
 </s> add         for attr, value in validated_data.items(): </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             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 create(self, validated_attrs):
 </s> add     def create(self, validated_data):
    def update(self, instance, validated_data):
                  setattr(instance, field_name, value)
  
          return instance
  
    def update(self, instance, validated_data):
          assert not any(
              isinstance(field, BaseSerializer) and not field.read_only
              for field in self.fields.values()
          ), (
              'The `.update()` method does not suport nested writable fields '
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