Take the trouble

Go to the trouble of / Take pains / Take pains to see to it / Take it upon oneself


Prendersi la pena di...

Prendersi la briga di... / Darsi la pena di... / Darsi cura di


Examples
Since your aunt went to the trouble of getting you a nice birthday present, the least you can do is to write her a thank-you note
Dato che tua zia si è data la pena di farti un regalo di compleanno, il meno che tu possa fare è scriverle un biglietto di ringraziamento

I wish you had taken the trouble to study better for your final
Vorrei che tu ti fossi preso la pena di prepararti meglio per l'esame finale

She had taken pains to see to it that her guests had everything they could possibly need
Lei si è data cura che i suoi ospiti avessero tutto quello di cui potessero aver bisogno