
    Design a function that analyzes student learning outcome relationships by counting pairs of interconnected skills in assessment data, where each skill pair can be considered in either direction (e.g., math→programming is equivalent to programming→math). The function should process a list of skill relationship tuples and determine how many unique bidirectional skill connections exist, helping identify key learning pathways for personalized study recommendations.
    

    
def count_bidirectional(test_list):
    """
    Design a function that analyzes student learning outcome relationships by counting pairs of interconnected skills in assessment data, where each skill pair can be considered in either direction (e.g., math→programming is equivalent to programming→math). The function should process a list of skill relationship tuples and determine how many unique bidirectional skill connections exist, helping identify key learning pathways for personalized study recommendations.
    

    """
def count_bidirectional(test_list):
    """
    Design a function that analyzes student learning outcome relationships by counting pairs of interconnected skills in assessment data, where each skill pair can be considered in either direction (e.g., math→programming is equivalent to programming→math). The function should process a list of skill relationship tuples and determine how many unique bidirectional skill connections exist, helping identify key learning pathways for personalized study recommendations.
    

    """
    res = 0
    for idx in range(0, len(test_list)):
        for iidx in range(idx + 1, len(test_list)):
            if test_list[iidx][0] == test_list[idx][1] and test_list[idx][1] == test_list[iidx][0]:
                res += 1
    return res