/**
 * This function takes a dictionary of artists and their details as input, along with the name of a specific artist.
 * It should return the details of the artist, only if the artist exists in the dictionary and has a non-empty 'genre'
 * value. Otherwise, it should return 'Not Found'.
 *
 * @param artists a dictionary containing artist details as key-value pairs.
 * @param artistName a string representing the name of the artist.
 * @return the details of the artist if found, otherwise 'Not Found'.
 */
fun artistDetails(artists: Map<String, Map<String, String>>, artistName: String): String {

    if (artistName in artists) {  // Check if the artist exists in the dictionary
        val artist = artists[artistName]!!  // Get the details of the artist

        // Nested dictionary with 'genre' as the key
        if (artist.containsKey("genre") && artist["genre"]!!.isNotEmpty()) {
            return artist["genre"]!!  // Return the genre value if it is non-empty
        } else {
            return "Not Found"
        }
    } else {
        return "Not Found"
    }
}
/**
 * This function takes a dictionary of artists and their details as input, along with the name of a specific artist.
 * It should return the details of the artist, only if the artist exists in the dictionary and has a non-empty 'genre'
 * value. Otherwise, it should return 'Not Found'.
 *
 * @param artists a dictionary containing artist details as key-value pairs.
 * @param artistName a string representing the name of the artist.
 * @return the details of the artist if found, otherwise 'Not Found'.
 */
fun artistDetails(artists: Map<String, Map<String, String>>, artistName: String): String {
/**
 * This function takes a dictionary of artists and their details as input, along with the name of a specific artist.
 * It should return the details of the artist, only if the artist exists in the dictionary and has a non-empty 'genre'
 * value. Otherwise, it should return 'Not Found'.
 *
 * @param artists a dictionary containing artist details as key-value pairs.
 * @param artistName a string representing the name of the artist.
 * @return the details of the artist if found, otherwise 'Not Found'.
 */
fun artistDetails(artists: Map<String, Map<String, String>>, artistName: String): String {

    if (artistName in artists) {  // Check if the artist exists in the dictionary
        val artist = artists[artistName]!!  // Get the details of the artist

        // Nested dictionary with 'genre' as the key
        if (artist.containsKey("genre") && artist["genre"]!!.isNotEmpty()) {
            return artist["genre"]!!  // Return the genre value if it is non-empty
        } else {
            return "Not Found"
        }
    } else {
        return "Not Found"
    }
}