/**
 * This function calculates the total revenue generated from a list of orders.
 *
 * @param orders A list of dictionaries representing different orders. Each dictionary contains the keys 'product' and 'price'.
 * @return The total revenue generated from the orders.
 */
fun calculateTotalRevenue(orders: List<Map<String, Any>>?): Float {

    var totalRevenue = 0f

    val ordersList = orders ?: emptyList()

    for (order in ordersList) {
        val product = order["product"] as? String
        val price = order["price"] as? Float

        if (product != null && price != null) {
            totalRevenue += price
        }
    }

    return totalRevenue
}
/**
 * This function calculates the total revenue generated from a list of orders.
 *
 * @param orders A list of dictionaries representing different orders. Each dictionary contains the keys 'product' and 'price'.
 * @return The total revenue generated from the orders.
 */
fun calculateTotalRevenue(orders: List<Map<String, Any>>?): Float {
/**
 * This function calculates the total revenue generated from a list of orders.
 *
 * @param orders A list of dictionaries representing different orders. Each dictionary contains the keys 'product' and 'price'.
 * @return The total revenue generated from the orders.
 */
fun calculateTotalRevenue(orders: List<Map<String, Any>>?): Float {

    var totalRevenue = 0f

    val ordersList = orders ?: emptyList()

    for (order in ordersList) {
        val product = order["product"] as? String
        val price = order["price"] as? Float

        if (product != null && price != null) {
            totalRevenue += price
        }
    }

    return totalRevenue
}