def _images_failed(cls, session, previous_transaction):
        """Deletes the files of :attr:`_stored_images` back and clears
        the :attr:`_stored_images` and :attr:`_deleted_images` set
        when the ongoing transaction has done rollback.

        """
        for image, store in cls._stored_images:
            store.delete(image)
        cls._stored_images.clear()
        cls._deleted_images.clear()
Deletes the files of :attr:`_stored_images` back and clears
        the :attr:`_stored_images` and :attr:`_deleted_images` set
        when the ongoing transaction has done rollback.