What function is the bolded word or phrase serving in the sentence?
Heihei's best friend learned to swim by imitating the
motions of her pet turtle.
Modifier
Object
Subject