          """
          This hook is required for bulk update.
          It is used to determine the canonical identity of a given object.
          """
          return data.get('id')
  
      @property
      def errors(self):
          """
          Run deserialization and return error data,
 
</s> remove         if self._deleted:
 </s> add         if self.allow_delete and self._deleted: </s> remove         serializer = self.BookSerializer(self.books(), data=data, many=True)
 </s> add         serializer = self.BookSerializer(self.books(), data=data, many=True, allow_delete=True)
        self.assertEqual(serializer.is_valid(), True)
        self.assertEqual(serializer.data, data)
        serializer.save()
        new_data = self.BookSerializer(self.books(), many=True).data
        self.assertEqual(data, new_data)

    def test_bulk_update_and_create(self):
        """
        Bulk update serialization may also include created items.
        """
        data = [
            {
                'id': 0,
                'title': 'The electric kool-aid acid test',
                'author': 'Tom Wolfe'
            }, {
                'id': 3,
                'title': 'Kafka on the shore',
                'author': 'Haruki Murakami'
            }
        ]
        serializer = self.BookSerializer(self.books(), data=data, many=True, allow_delete=True) </s> remove                 try:
                    iter(data)
                    if isinstance(data, dict):
                        raise TypeError
                except TypeError:
                    self._errors = {'non_field_errors': ['Expected a list of items']}
                else:
 </s> add                 if hasattr(data, '__iter__') and not isinstance(data, (dict, six.text_type)):
        try:
            return data.get('id', None)
        except AttributeError:
            return None
          """
          This hook is required for bulk update.
          It is used to determine the canonical identity of a given object.
          """
        try:
            return data.get('id', None)
        except AttributeError:
            return None
  
      @property
      def errors(self):
          """
          Run deserialization and return error data,
keep keep keep keep replace keep keep keep keep keep
 Bit of extra tidying and plenty of docs 
rest_framework/serializers.py