/**
 * This function takes a nested tuple representing appliances grouped by room and returns the number of appliances
 * that have been checked by the electrician. Each appliance in the tuple is represented by a tuple containing the name
 * of the appliance and a boolean value indicating whether it has been checked or not.
 *
 * @param appliances A nested tuple representing appliances grouped by room.
 * @return The count of appliances that have been checked.
 */
fun countNumOfCheckedAppliances(appliances: List<List<Pair<String, Boolean>>>): Int {

    var totalCheckedAppliances = 0

    for (room in appliances) {
        if (room.isNotEmpty()) {
            for (appliance in room) {
                if (appliance.first.isNotEmpty() && appliance.second != null) {
                    if (appliance.second) {
                        totalCheckedAppliances++
                    }
                }
            }
        }
    }

    return totalCheckedAppliances
}
/**
 * This function takes a nested tuple representing appliances grouped by room and returns the number of appliances
 * that have been checked by the electrician. Each appliance in the tuple is represented by a tuple containing the name
 * of the appliance and a boolean value indicating whether it has been checked or not.
 *
 * @param appliances A nested tuple representing appliances grouped by room.
 * @return The count of appliances that have been checked.
 */
fun countNumOfCheckedAppliances(appliances: List<List<Pair<String, Boolean>>>): Int {
/**
 * This function takes a nested tuple representing appliances grouped by room and returns the number of appliances
 * that have been checked by the electrician. Each appliance in the tuple is represented by a tuple containing the name
 * of the appliance and a boolean value indicating whether it has been checked or not.
 *
 * @param appliances A nested tuple representing appliances grouped by room.
 * @return The count of appliances that have been checked.
 */
fun countNumOfCheckedAppliances(appliances: List<List<Pair<String, Boolean>>>): Int {

    var totalCheckedAppliances = 0

    for (room in appliances) {
        if (room.isNotEmpty()) {
            for (appliance in room) {
                if (appliance.first.isNotEmpty() && appliance.second != null) {
                    if (appliance.second) {
                        totalCheckedAppliances++
                    }
                }
            }
        }
    }

    return totalCheckedAppliances
}