/**
 * The function modifies the duration of a specific song in a dictionary that contains information about multiple songs.
 *
 * @param songInfo A dictionary containing information about multiple songs.
 * @param songName A string representing the name of the song to be modified.
 * @param newDuration An integer representing the new duration in seconds for the song.
 * @return A modified dictionary with the updated duration for the specified song.
 */
fun modifySongDuration(songInfo: MutableMap<String, MutableMap<String, Any>>, songName: String, newDuration: Int): MutableMap<String, MutableMap<String, Any>> {

    if (!songInfo.containsKey(songName)) {
        println("The song does not exist in the dictionary.")
        return songInfo
    }

    if (!songInfo[songName]!!.containsKey("duration")) {
        println("The song lacks duration information.")
        return songInfo
    }

    if (newDuration <= 0) {
        println("Invalid duration provided.")
        return songInfo
    }

    songInfo[songName]!!["duration"] = newDuration
    return songInfo
}
/**
 * The function modifies the duration of a specific song in a dictionary that contains information about multiple songs.
 *
 * @param songInfo A dictionary containing information about multiple songs.
 * @param songName A string representing the name of the song to be modified.
 * @param newDuration An integer representing the new duration in seconds for the song.
 * @return A modified dictionary with the updated duration for the specified song.
 */
fun modifySongDuration(songInfo: MutableMap<String, MutableMap<String, Any>>, songName: String, newDuration: Int): MutableMap<String, MutableMap<String, Any>> {
/**
 * The function modifies the duration of a specific song in a dictionary that contains information about multiple songs.
 *
 * @param songInfo A dictionary containing information about multiple songs.
 * @param songName A string representing the name of the song to be modified.
 * @param newDuration An integer representing the new duration in seconds for the song.
 * @return A modified dictionary with the updated duration for the specified song.
 */
fun modifySongDuration(songInfo: MutableMap<String, MutableMap<String, Any>>, songName: String, newDuration: Int): MutableMap<String, MutableMap<String, Any>> {

    if (!songInfo.containsKey(songName)) {
        println("The song does not exist in the dictionary.")
        return songInfo
    }

    if (!songInfo[songName]!!.containsKey("duration")) {
        println("The song lacks duration information.")
        return songInfo
    }

    if (newDuration <= 0) {
        println("Invalid duration provided.")
        return songInfo
    }

    songInfo[songName]!!["duration"] = newDuration
    return songInfo
}