pub fn modal_depth(expr: &TLExpr) -> usize
Calculate the modal depth of an expression.
Returns the maximum nesting level of modal operators.