/**
 * This function takes a list of musicians and filters out the musicians who are talented in multiple instruments
 * and play a specific genre.
 *
 * @param musicians A list of dictionaries representing musicians, where each dictionary has keys 'name', 'instruments',
 * and 'genre'.
 * @return A list of names of musicians who are talented in multiple instruments and play a specific genre.
 */
fun filterTalentedMusicians(musicians: List<Map<String, Any>>): List<String> {

    return musicians.filter { it["instruments"] is List<*> && (it["instruments"] as List<*>).size > 1 && it["genre"] == "Jazz" }
        .map { it["name"] as String }
}
/**
 * This function takes a list of musicians and filters out the musicians who are talented in multiple instruments
 * and play a specific genre.
 *
 * @param musicians A list of dictionaries representing musicians, where each dictionary has keys 'name', 'instruments',
 * and 'genre'.
 * @return A list of names of musicians who are talented in multiple instruments and play a specific genre.
 */
fun filterTalentedMusicians(musicians: List<Map<String, Any>>): List<String> {
/**
 * This function takes a list of musicians and filters out the musicians who are talented in multiple instruments
 * and play a specific genre.
 *
 * @param musicians A list of dictionaries representing musicians, where each dictionary has keys 'name', 'instruments',
 * and 'genre'.
 * @return A list of names of musicians who are talented in multiple instruments and play a specific genre.
 */
fun filterTalentedMusicians(musicians: List<Map<String, Any>>): List<String> {

    return musicians.filter { it["instruments"] is List<*> && (it["instruments"] as List<*>).size > 1 && it["genre"] == "Jazz" }
        .map { it["name"] as String }
}