sS dropTrailingRoundBracketStuff(S s) {
  if (!endsWith(s, ")")) ret s;
  ret trimSubstring(s, 0, smartLastIndexOf(s, '('));
}