
    Write a function that analyzes bus route data to identify and count pairs of reciprocal bus connections between stops, where a reciprocal connection exists when there are routes running in both directions between two stops (e.g., Stop A to Stop B and Stop B to Stop A). The function should help transit planners understand route symmetry by counting how many stop pairs have bidirectional service, treating (Stop A, Stop B) and (Stop B, Stop A) as a single bidirectional pair.
    

    
def count_bidirectional(test_list):
    """
    Write a function that analyzes bus route data to identify and count pairs of reciprocal bus connections between stops, where a reciprocal connection exists when there are routes running in both directions between two stops (e.g., Stop A to Stop B and Stop B to Stop A). The function should help transit planners understand route symmetry by counting how many stop pairs have bidirectional service, treating (Stop A, Stop B) and (Stop B, Stop A) as a single bidirectional pair.
    

    """
def count_bidirectional(test_list):
    """
    Write a function that analyzes bus route data to identify and count pairs of reciprocal bus connections between stops, where a reciprocal connection exists when there are routes running in both directions between two stops (e.g., Stop A to Stop B and Stop B to Stop A). The function should help transit planners understand route symmetry by counting how many stop pairs have bidirectional service, treating (Stop A, Stop B) and (Stop B, Stop A) as a single bidirectional pair.
    

    """
    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