import re def clean_text(text): """ Removes special AI tags from the text. """ return re.sub(r'|', '', text) if re.search(r'|', text) else text