/**
 * This function determines the intersection of advantages between two musicians and checks if they are equal.
 *
 * @param musician1 The first musician.
 * @param musician2 The second musician.
 * @return A pair containing the common advantages between the musicians and a boolean indicating if the advantages are equal in count.
 */
fun advantagesEqual(musician1: Map<String, Any>, musician2: Map<String, Any>): Pair<Set<String>, Boolean> {

    // Find the advantages of musician1
    val musician1Advantages = musician1["advantages"] as Set<String>
    
    // Find the advantages of musician2
    val musician2Advantages = musician2["advantages"] as Set<String>
    
    // Find the common advantages between musician1 and musician2
    val commonAdvantages = musician1Advantages.intersect(musician2Advantages)
    
    // Check if the advantages are equal in count
    val advantagesEqual = musician1Advantages.size == musician2Advantages.size
    
    return Pair(commonAdvantages, advantagesEqual)
}
/**
 * This function determines the intersection of advantages between two musicians and checks if they are equal.
 *
 * @param musician1 The first musician.
 * @param musician2 The second musician.
 * @return A pair containing the common advantages between the musicians and a boolean indicating if the advantages are equal in count.
 */
fun advantagesEqual(musician1: Map<String, Any>, musician2: Map<String, Any>): Pair<Set<String>, Boolean> {
/**
 * This function determines the intersection of advantages between two musicians and checks if they are equal.
 *
 * @param musician1 The first musician.
 * @param musician2 The second musician.
 * @return A pair containing the common advantages between the musicians and a boolean indicating if the advantages are equal in count.
 */
fun advantagesEqual(musician1: Map<String, Any>, musician2: Map<String, Any>): Pair<Set<String>, Boolean> {

    // Find the advantages of musician1
    val musician1Advantages = musician1["advantages"] as Set<String>
    
    // Find the advantages of musician2
    val musician2Advantages = musician2["advantages"] as Set<String>
    
    // Find the common advantages between musician1 and musician2
    val commonAdvantages = musician1Advantages.intersect(musician2Advantages)
    
    // Check if the advantages are equal in count
    val advantagesEqual = musician1Advantages.size == musician2Advantages.size
    
    return Pair(commonAdvantages, advantagesEqual)
}