/**
 * This function takes a list of rooms and returns a set containing all unique colors used in the rooms.
 */
fun calculateColorsUsed(rooms: List<Map<String, List<Map<String, List<String>>>>>): Set<String> {

    val colorsUsed = rooms.flatMap { room ->
        room["furniture_list"]?.flatMap { furniture ->
            furniture["colors"] ?: emptyList()
        } ?: emptyList()
    }.toSet()

    return colorsUsed
}
/**
 * This function takes a list of rooms and returns a set containing all unique colors used in the rooms.
 */
fun calculateColorsUsed(rooms: List<Map<String, List<Map<String, List<String>>>>>): Set<String> {
/**
 * This function takes a list of rooms and returns a set containing all unique colors used in the rooms.
 */
fun calculateColorsUsed(rooms: List<Map<String, List<Map<String, List<String>>>>>): Set<String> {

    val colorsUsed = rooms.flatMap { room ->
        room["furniture_list"]?.flatMap { furniture ->
            furniture["colors"] ?: emptyList()
        } ?: emptyList()
    }.toSet()

    return colorsUsed
}