def METHOD_NAME(category):
    category.is_deleted = True
    db.session.flush()
    signals.category.deleted.send(category)
    logger.info('Category %s deleted by %s', category, session.user)
    category.log(CategoryLogRealm.category, LogKind.negative, 'Category', 'Category deleted', session.user)
    category.parent.log(CategoryLogRealm.category, LogKind.negative, 'Content',
                        f'Subcategory deleted: "{category.title}"', session.user)