Check if the text only contains:
    1. blackslash escaped parentheses, or
    2. parentheses paired.

def is_paired(text, open='(', close=')'):
    """Check if the text only contains:
    1. blackslash escaped parentheses, or
    2. parentheses paired.
    """
    count = 0
    escape = False
    for c in text:
        if escape:
            escape = False
        elif c == '\\':
            escape = True
        elif c == open:
            count += 1
        elif c == close:
            if count == 0:
                return False
            count -= 1
    return count == 0