/**
 * This function allows a musician to add an album to their music library.
 *
 * @param library A dictionary representing the music library.
 * @param artist The name of the artist of the album.
 * @param album The title of the album.
 * @param genre The genre of the album.
 * @return The updated music library dictionary.
 */
fun addAlbumToLibrary(library: MutableMap<String, MutableMap<String, MutableList<String>>>, artist: String, album: String, genre: String): MutableMap<String, MutableMap<String, MutableList<String>>> {

    if (!library.containsKey(artist)) {
        library[artist] = mutableMapOf()
    }
    if (!library[artist]!!.containsKey(genre)) {
        library[artist]!![genre] = mutableListOf()
    }
    library[artist]!![genre]!!.add(album)
    return library
}
/**
 * This function allows a musician to add an album to their music library.
 *
 * @param library A dictionary representing the music library.
 * @param artist The name of the artist of the album.
 * @param album The title of the album.
 * @param genre The genre of the album.
 * @return The updated music library dictionary.
 */
fun addAlbumToLibrary(library: MutableMap<String, MutableMap<String, MutableList<String>>>, artist: String, album: String, genre: String): MutableMap<String, MutableMap<String, MutableList<String>>> {
/**
 * This function allows a musician to add an album to their music library.
 *
 * @param library A dictionary representing the music library.
 * @param artist The name of the artist of the album.
 * @param album The title of the album.
 * @param genre The genre of the album.
 * @return The updated music library dictionary.
 */
fun addAlbumToLibrary(library: MutableMap<String, MutableMap<String, MutableList<String>>>, artist: String, album: String, genre: String): MutableMap<String, MutableMap<String, MutableList<String>>> {

    if (!library.containsKey(artist)) {
        library[artist] = mutableMapOf()
    }
    if (!library[artist]!!.containsKey(genre)) {
        library[artist]!![genre] = mutableListOf()
    }
    library[artist]!![genre]!!.add(album)
    return library
}