code: def delete_thumbnails(self, image_file):
          
          thumbnail_keys = self._get(image_file.key, identity='thumbnails')
          if thumbnail_keys:
              # Delete all thumbnail keys from store and delete the
              # thumbnail ImageFiles.
  
              for key in thumbnail_keys:
                  thumbnail = self._get(key)
                  if thumbnail:
                      self.delete(thumbnail, False)
                      thumbnail.delete()  # delete the actual file
  
              # Delete the thumbnails key from store
              self._delete(image_file.key, identity='thumbnails')
docs: Deletes references to thumbnails as well as thumbnail ``image_files``.