When any person holding a homestead or tree claim entry under the laws of the United States has died before making final proof and final proof has afterwards been made by the heirs, devisees, or representatives, and a patent has been granted to the “heirs” or “devisees,” the district court of the county in which the real estate so patented is situated, may determine who are such heirs or devisees, and may determine their respective shares in such homestead or tree claim. The provisions of the Code of Civil Procedure relating to the determination of adverse claims to real estate in so far as the same may be applicable, shall pertain to and govern the procedure in the action provided for in this section.