def collapse_parentheses(text):
    """
    Removes all parenthetical expressions from the given string and leaves
    open/close parenthesis pairs, so that anything left is unparenthesized.

    Example: a, (b or c), (d and e) => a, (), ()
    """
    mut = ""
    paren_level = 0
    for c in text:
        if c == "(":
            paren_level += 1
            if paren_level == 1: mut += c
        elif c == ")":
            paren_level -= 1
            if paren_level == 0: mut += c
        elif paren_level == 0:
            mut += c
    return mut