Section 32. An executor or administrator appointed in another state or country upon the estate of a person who was not at the time of his death a resident of this commonwealth and upon whose estate administration has not been granted in this commonwealth, duly qualified and acting, may file an authenticated copy of the record of his appointment and of his bond in the probate court for any county where there is real estate of the deceased; and such executor or administrator, after such notice to the commissioner of revenue, creditors and all other persons interested as the court may order, may be licensed to sell said real estate or an undivided interest therein in such manner and upon such notice as the court orders. But such license shall not be granted unless the court finds that six months have expired since the death of the deceased, that the executor or administrator has given a sufficient bond and will be liable to account for the proceeds of the sale in the state or country where he was appointed that the executor or administrator has filed in the probate court a certificate of the commissioner of revenue showing either that the amount of tax under chapter sixty-five C has been paid, that payment thereof has been secured as provided in section ten of said chapter sixty-five C, or that no tax is due, and that no creditor or other person interested will be prejudiced thereby. The net proceeds of such sale, after deducting the expenses thereof and after the payment and satisfaction of all claims against said estate in this commonwealth, may be taken by said foreign executor or administrator out of the commonwealth to be accounted for in the court in which he received his appointment. For dates of death on or after January 1, 1997, said certificate of the commissioner shall not be required.