In all cases where a grant, devise or bequest or gift has been made by any person for educational purposes, in aid of or connected with the free public school system, and from any cause cannot be executed or carried out according to its terms and conditions, the person having charge thereof or holding the same in trust, or any person interested therein, may file a petition in the circuit court of the county where the grantor, donor or testator died, setting forth all the facts connected therewith, and, in the discretion of the court in which the petition is filed, an order may be made directing that the amount of the grant, gift, devise or bequest shall be turned over to the director of revenue of the state as a part of the public school fund, according to the terms and conditions of sections 166.011 to 166.121. The annual income on the proceeds of the grant, devise, gift or bequest shall be faithfully appropriated, as near as may be, in meeting and carrying out the purposes and wishes of the grantor, donor, devisor or testator, according to the instrument of writing making the grant, gift, devise or bequest.
§ 166.101, RSMo