/**
 * Synchronizes the lighting sequence of a list of lights with a given time interval.
 *
 * @param lights A list containing the lighting sequence of the lights.
 * @param interval The time interval (in seconds) between two lighting operations.
 * @return The synchronized lighting sequence of the lights.
 */
fun synchronizeLighting(lights: List<Float>, interval: Int): List<List<Float>> {

    val synchronizedLights = mutableListOf<List<Float>>()
    val maxLights = lights.maxOrNull() ?: 0f

    for (light in lights) {
        val synchronizedLight = mutableListOf<Float>()
        repeat((maxLights / interval).toInt()) {
            synchronizedLight.add(light)
        }
        synchronizedLights.add(synchronizedLight)
    }

    return synchronizedLights
}
/**
 * Synchronizes the lighting sequence of a list of lights with a given time interval.
 *
 * @param lights A list containing the lighting sequence of the lights.
 * @param interval The time interval (in seconds) between two lighting operations.
 * @return The synchronized lighting sequence of the lights.
 */
fun synchronizeLighting(lights: List<Float>, interval: Int): List<List<Float>> {
/**
 * Synchronizes the lighting sequence of a list of lights with a given time interval.
 *
 * @param lights A list containing the lighting sequence of the lights.
 * @param interval The time interval (in seconds) between two lighting operations.
 * @return The synchronized lighting sequence of the lights.
 */
fun synchronizeLighting(lights: List<Float>, interval: Int): List<List<Float>> {

    val synchronizedLights = mutableListOf<List<Float>>()
    val maxLights = lights.maxOrNull() ?: 0f

    for (light in lights) {
        val synchronizedLight = mutableListOf<Float>()
        repeat((maxLights / interval).toInt()) {
            synchronizedLight.add(light)
        }
        synchronizedLights.add(synchronizedLight)
    }

    return synchronizedLights
}