def METHOD_NAME(activation_text, evt: gr.SelectData):
    tag = evt.value[0]
    words = re.split(re_comma, activation_text)
    if tag in words:
        words = [x for x in words if x != tag and x.strip()]
        return ", ".join(words)
    return activation_text + ", " + tag if activation_text else tag