May I share with my personal experience of how this may be.
At the moment I am preparing our Garden for this summer, so that the veggies can grow, and that the earth may bring forth her abundance of good food for us to enjoy and eat.
Before the soil can be of any use for the reception of the rain, the weeds must come out. Unfortunately, the soil cannot do this by itself, it needs a gardener. The Gardener takes away the weeds, gently pulling them out if there are good crops within. The bigger the weed, the deeper its roots.
Once the weeds are out, the soil needs a toss and a turn, ensuring that the hardened parts of the soil are soft and ready for the sprinkling of water and seeds.
When these things are done, and the seeds are planted after this process of refining, the garden is ready for the rain.
As it is with the soil of the Earth, so it is with our hearts.
We cannot, of ourselves, take out the weeds in our hearts, but our heavenly Father can. He has given us a divine pattern that we should follow, and above all, the Rock of Ages. If we fall upon the Rock, we will be broken, and be safely placed on that rock for the Father to rebuild our hearts into the lovely image of Jesus. If the Rock falls on us, our existence will surely perish and be no more.
When, tough test and trial come about us, we must remember that our heavenly Father has allowed these these to happen, and that all things pass his examination, before anything touches us (1Cor 10:13). As the gardener refines the soil, so that it is soft, even so does our heavenly Father refines our hearts, that it may reflect the image of His Son. For He sits as a refiner of silver and gold. He shall purify the sons of Levi.
This I beleieve is the prep work of the heart, and my prayer is that the Lord will contionue to refine my heart more and more.
I pray that this may be our cry, to the Father and the Son.