import re


def remove_braces(text):
    """Removes various braces and brackets from the text."""
    # remove square and curly braces and their contents (if less than 40 chars)
    text = re.sub(r"\{[^}]{,40}\}", "", text)
    # remove text between ⟦ and ⟧ as the pairs were manually checked, there is no length restriction
    text = re.sub(r"⟦[^⟧]*⟧", "", text)
    return text