/**
 * This function takes a list of families as input and returns a list of parents in those families
 */
fun getFamilyParents(family: List<List<Map<String, Any>>>) : List<Any> {

    val parents = mutableListOf<Any>()
    var i = 0

    while (i < family.size) {
        var j = 0

        while (j < family[i].size) {
            if (family[i][j] is Map<*, *>) {
                if ("parent" in family[i][j].keys) {
                    parents.add(family[i][j]["parent"]!!)
                }
            }
            j++
        }
        i++
    }

    return parents
}
/**
 * This function takes a list of families as input and returns a list of parents in those families
 */
fun getFamilyParents(family: List<List<Map<String, Any>>>) : List<Any> {
/**
 * This function takes a list of families as input and returns a list of parents in those families
 */
fun getFamilyParents(family: List<List<Map<String, Any>>>) : List<Any> {

    val parents = mutableListOf<Any>()
    var i = 0

    while (i < family.size) {
        var j = 0

        while (j < family[i].size) {
            if (family[i][j] is Map<*, *>) {
                if ("parent" in family[i][j].keys) {
                    parents.add(family[i][j]["parent"]!!)
                }
            }
            j++
        }
        i++
    }

    return parents
}