Rigify: Is it possible to execute Rigify's UI functions via python?

I have a character animation using a rigify human rig. I blocked the animations using different IK Parents for the hand controllers. Before I start splining I want to unify the IK Parent for all my keyframes (above 200 breakdown keys). So I thought using a script to simply loop over all keyframes and set the correct IK parent would be nice. But I don’t know how to execute functions from the rig ui via python

rigify’s ui functions are already called by python (by rigify), so yes- absolutely. if you have python tooltips enabled you should be able to hover over any UI panel and see what the python command is to execute it. For example:
image

looks promising. Didn’t know python tooltips exist tho. I will give it a try.

image
How do I know what arguments are necessary and in which order?

in the python console, type the operator with the opening parenthesis and press tab