How can I assign the Animated Target through code?

I’m working with a player rig and I want to put multiple models in it. Unfortunately, the Cinemachine normally wants me to assign an Animated Target through the inspector. This means only one at a time can be assigned.

How can I assign it through code? I want the Animated Target to always be the only active Animator on my Rig (or the top one if I have multiple models active).

You should be able to set CinemachineStateDrivenCamera.m_AnimatedTarget from script.