Here is the sentence:
Agitating the clothes in the sudsy water, the washing machine got the gravy
stain out of the shirt.
Nice answer! Agitating the clothes in the sudsy water, a participle phrase, comes right before washing machine, its logical target.