Pythonic/MEL Way to Retarget HIK

Hey there.   Using Maya 2018 here.   I'm trying to automate my process of adding mocap to a custom rig. I've currently written a script that duplicates the joint hierarchy and loads in my HIK preset definition. However, I can't seem to figure out a way to script out changing the "source" rig in the…