          obj.save(**kwargs)
  
          if getattr(obj, '_m2m_data', None):
              for accessor_name, object_list in obj._m2m_data.items():
                  setattr(obj, accessor_name, object_list)
              del(obj._m2m_data)
  
          if getattr(obj, '_related_data', None):
 
</s> remove                     # TODO: Following will be needed for reverse FK
                    # if field.many:
                    #     # Nested reverse fk relationship
                    #     for related_item in related:
                    #         fk_field = obj._meta.get_field_by_name(accessor_name)[0].field.name
                    #         setattr(related_item, fk_field, obj)
                    #         self.save_object(related_item)
                    # else:
                    # Nested reverse one-one relationship
                    fk_field = obj._meta.get_field_by_name(accessor_name)[0].field.name
                    setattr(related, fk_field, obj)
                    self.save_object(related)
 </s> add                     if field.many:
                        # Nested reverse fk relationship
                        for related_item in related:
                            fk_field = obj._meta.get_field_by_name(accessor_name)[0].field.name
                            setattr(related_item, fk_field, obj)
                            self.save_object(related_item)
                    else:
                        # Nested reverse one-one relationship
                        fk_field = obj._meta.get_field_by_name(accessor_name)[0].field.name
                        setattr(related, fk_field, obj)
                        self.save_object(related) </s> remove         if self.allow_delete and self._deleted:
 </s> add         if self.allow_add_remove and self._deleted:
        if self.allow_add_remove and hasattr(obj, '_removed_relations'):
            [self.delete_object(item) for item in obj._removed_relations]

          obj.save(**kwargs)
  
        if self.allow_add_remove and hasattr(obj, '_removed_relations'):
            [self.delete_object(item) for item in obj._removed_relations]

          if getattr(obj, '_m2m_data', None):
              for accessor_name, object_list in obj._m2m_data.items():
                  setattr(obj, accessor_name, object_list)
              del(obj._m2m_data)
  
          if getattr(obj, '_related_data', None):
keep add keep keep keep keep keep keep
 one-many writable nested modelserializer support 
rest_framework/serializers.py