/**
 * Return a list of photos that have exposure times within the specified range.
 *
 * @param photos A list of dictionaries representing photos, where each dictionary contains the photo's metadata.
 *               Each dictionary must have the key 'exposure_time', which represents the photo's exposure time in seconds.
 * @param exposureTimes A tuple containing two float values representing the minimum and maximum exposure times.
 * @return A list of photos with exposure times within the specified range.
 */
fun getPhotosByExposure(photos: List<Map<String, Any>>, exposureTimes: Pair<Float, Float>): List<Map<String, Any>> {

    // Initialize an empty list to store the photos within the specified range
    val photosWithinRange = mutableListOf<Map<String, Any>>()
    
    // Iterate through each photo
    for (photo in photos) {
        // Check if the exposure time of the photo falls within the specified range
        if (exposureTimes.first <= photo["exposure_time"] as Float && photo["exposure_time"] as Float <= exposureTimes.second) {
            // Append the photo to the list of photos within the range
            photosWithinRange.add(photo)
        }
    }
    
    // Return the list of photos within the specified range
    return photosWithinRange
}
/**
 * Return a list of photos that have exposure times within the specified range.
 *
 * @param photos A list of dictionaries representing photos, where each dictionary contains the photo's metadata.
 *               Each dictionary must have the key 'exposure_time', which represents the photo's exposure time in seconds.
 * @param exposureTimes A tuple containing two float values representing the minimum and maximum exposure times.
 * @return A list of photos with exposure times within the specified range.
 */
fun getPhotosByExposure(photos: List<Map<String, Any>>, exposureTimes: Pair<Float, Float>): List<Map<String, Any>> {
/**
 * Return a list of photos that have exposure times within the specified range.
 *
 * @param photos A list of dictionaries representing photos, where each dictionary contains the photo's metadata.
 *               Each dictionary must have the key 'exposure_time', which represents the photo's exposure time in seconds.
 * @param exposureTimes A tuple containing two float values representing the minimum and maximum exposure times.
 * @return A list of photos with exposure times within the specified range.
 */
fun getPhotosByExposure(photos: List<Map<String, Any>>, exposureTimes: Pair<Float, Float>): List<Map<String, Any>> {

    // Initialize an empty list to store the photos within the specified range
    val photosWithinRange = mutableListOf<Map<String, Any>>()
    
    // Iterate through each photo
    for (photo in photos) {
        // Check if the exposure time of the photo falls within the specified range
        if (exposureTimes.first <= photo["exposure_time"] as Float && photo["exposure_time"] as Float <= exposureTimes.second) {
            // Append the photo to the list of photos within the range
            photosWithinRange.add(photo)
        }
    }
    
    // Return the list of photos within the specified range
    return photosWithinRange
}