/**
 * Returns the common elements between two sets of nodes.
 *
 * @param setA The first set of nodes.
 * @param setB The second set of nodes.
 * @return The set of common nodes between setA and setB.
 */
fun commonNodes(setA: Set<Any>, setB: Set<Any>): Set<Any> {

    // Initialize an empty set to store the common nodes
    val commonNodes = mutableSetOf<Any>()
    
    // Start outer loop to iterate through setA
    for (nodeA in setA) {
        // Start inner loop to iterate through setB
        for (nodeB in setB) {
            // Check if current nodeA is equal to current nodeB
            if (nodeA == nodeB) {
                // Add the common node to the set of common nodes
                commonNodes.add(nodeA)
            }
        }
    }
    
    // Return the set of common nodes
    return commonNodes
}
/**
 * Returns the common elements between two sets of nodes.
 *
 * @param setA The first set of nodes.
 * @param setB The second set of nodes.
 * @return The set of common nodes between setA and setB.
 */
fun commonNodes(setA: Set<Any>, setB: Set<Any>): Set<Any> {
/**
 * Returns the common elements between two sets of nodes.
 *
 * @param setA The first set of nodes.
 * @param setB The second set of nodes.
 * @return The set of common nodes between setA and setB.
 */
fun commonNodes(setA: Set<Any>, setB: Set<Any>): Set<Any> {

    // Initialize an empty set to store the common nodes
    val commonNodes = mutableSetOf<Any>()
    
    // Start outer loop to iterate through setA
    for (nodeA in setA) {
        // Start inner loop to iterate through setB
        for (nodeB in setB) {
            // Check if current nodeA is equal to current nodeB
            if (nodeA == nodeB) {
                // Add the common node to the set of common nodes
                commonNodes.add(nodeA)
            }
        }
    }
    
    // Return the set of common nodes
    return commonNodes
}