What does the idiom "pull the chestnuts out of the fire" mean?

What does the idiom "pull the chestnuts out of the fire" mean?

Explanation

The most appropriate meaning idiom 'pulled the chestnut out of the fire' is 'accomplishing a difficult job for someone else'.


• Pull the chestnuts out of the fire: succeed in a hazardous undertaking for someone else's benefit.