An user might want to add extra spaces for better readability, e.g:
mypm = pm.PassManager.parse(f"""builtin.module( mypass1, func.func(mypass2,mypass3) )""")
GitHub issue #59151
The parser was not taking into account the possibility of spaces after )or }
super nit: could you move this one line up so that CHECK_ERROR_X tests are put together