/**
 * This function checks whether the given temperature data contains any value that is above the upper limit of a certain range.
 * If any value is found to be above the upper limit, the function returns a Pair with True as the first element and the index of the first value above the limit as the second element.
 * If all values are within the limit, the function returns null.
 */
fun checkTemperature(temperatureData: List<Double?>): Pair<Boolean, Int>? {

    val upperLimit = 25.0

    for ((index, temperature) in temperatureData.withIndex()) {
        if (temperature == null) {
            continue
        }
        if (temperature > upperLimit) {
            return Pair(true, index)
        }
    }

    return null
}
/**
 * This function checks whether the given temperature data contains any value that is above the upper limit of a certain range.
 * If any value is found to be above the upper limit, the function returns a Pair with True as the first element and the index of the first value above the limit as the second element.
 * If all values are within the limit, the function returns null.
 */
fun checkTemperature(temperatureData: List<Double?>): Pair<Boolean, Int>? {
/**
 * This function checks whether the given temperature data contains any value that is above the upper limit of a certain range.
 * If any value is found to be above the upper limit, the function returns a Pair with True as the first element and the index of the first value above the limit as the second element.
 * If all values are within the limit, the function returns null.
 */
fun checkTemperature(temperatureData: List<Double?>): Pair<Boolean, Int>? {

    val upperLimit = 25.0

    for ((index, temperature) in temperatureData.withIndex()) {
        if (temperature == null) {
            continue
        }
        if (temperature > upperLimit) {
            return Pair(true, index)
        }
    }

    return null
}