When real estate is sold by virtue of any proceedings in partition in this state, and the residence of a person interested for life or otherwise in the proceeds thereof is not known, or it is not known whether or not a person, who would, if living, be interested for life or otherwise in the proceeds thereof, is living, or when a person interested for life or otherwise in such proceeds, whether or not a resident of this state, is presumed dead by reason of his absence for 7 years, the court having power to distribute such proceeds may, by its order or judgment:
a. Order the share or interest of any such person to be deposited with the court and invested as provided by law with respect to other funds so deposited; or it may direct the same to be invested in other securities; or it may direct and control the custody of the securities which may be taken, from time to time, for any investment ordered; andb. Order, at such time as the court may determine, either before or after an investment is ordered, or at any time after the proceeds or any part thereof has been deposited in court, a distribution of the share or interest, which any such person would, if living, be entitled to, to or among such person or persons interested in such share of the proceeds as are known to be living, in proportion to their respective interests therein, or to and among the person or persons thereto entitled by law if any such person is dead or is presumed to be dead and fix the time when it shall be determined or deemed any such person died; andc. Order refunding bonds to be given, by or on behalf of any of the persons to whom any part of any such share shall be distributed, to the clerk of the court and his successors in office, in such sum and with such condition, with or without security, as the court may direct.