How to set animator's avatar by script?

I need to set one specific animator controller’s avatar by script, anyone know how its done?

void Update()
{
    Animator myAnimator = GetComponent<Animator>();
    //This is done to set the proper avatar so animations will work
    if(skinModel == "Cube One")
    {
        myAnimator.avatar ;
    }
    else if(skinModel == "Cube Two")
    {
        myAnimator.avatar ;
    }
}

You aren’t supposed to try and change the Animator Controller’s avatar by script. Each Animator component can have its own avatar, you’ll just have to make a list of the Animators = Animator