When any person holding a homestead or tree claim under the laws of the United States shall have died before patent therefor has been issued, and, by reason of such death, a patent or final certificate afterward shall be granted to "the heirs" or to "the devisees" of such person, the district court of the county in which the lands are situated, in a civil action brought for that purpose, may determine who are such heirs or devisees and what are their respective shares in said homestead or tree claim. Such action shall be governed by the provisions of this chapter insofar as the same may be applicable.
N.D.C.C. § 32-17-19