At any time during the administration of an estate, and irrespective of the pendency of a particular proceeding, the probate court shall have power to hear an application for, and fix and determine, the compensation and expenses of an attorney for services rendered to the estate or to its representative or to a devisee, legatee, distributee or any other person interested therein.
Such application shall be instituted by a petition, upon a form provided by the court. Notice of the application shall be given in such manner as the court shall direct. In the event that the court shall determine that any sum or sums is or are due to the petitioner or to any other party interested in the application, the compensation shall be awarded on an equitable basis in accordance with the size, importance, complexity and difficulty of the matters involved and the time spent thereon. The court may direct payment thereof from the estate generally or from funds in the hands of the representative of the estate and belonging to any legatee, devisee, distributee or other person interested therein.
In the event that the court shall determine that any such attorney has already received or been paid a sum in excess of the fair value of his services on such equitable basis, as thus determined, the court shall have power to direct him to refund such excess.
For the purposes of this section, the term "estate" shall be deemed to include trusts, guardianships, conservatorships and all other relationships involving the administration of property by fiduciaries.
Mass. Gen. Laws ch. 215, § 39A