code: def unindex_model_on_delete(sender, document, **kwargs):
      '''Unindex Mongo document on post_delete'''
      if current_app.config.get('AUTO_INDEX'):
          unindex.delay(documentf unindex_model_on_delete(sender, document, **kwargs):
      '''Unindex Mongo document on post_delete'''
      if current_app.config.get('AUTO_INDEX'):
          unindex.delay(document)
docs: Unindex Mongo document on post_delete