
    Write a function that analyzes a list of transaction pairs between bank accounts, where each pair represents a two-way money transfer relationship between customers, and counts the number of unique bidirectional transaction relationships. For example, if account A has transferred money to account B and account B has transferred money to account A, this counts as one bidirectional relationship, regardless of the order in which the transfers occurred.
    

    
def count_bidirectional(test_list):
    """
    Write a function that analyzes a list of transaction pairs between bank accounts, where each pair represents a two-way money transfer relationship between customers, and counts the number of unique bidirectional transaction relationships. For example, if account A has transferred money to account B and account B has transferred money to account A, this counts as one bidirectional relationship, regardless of the order in which the transfers occurred.
    

    """
def count_bidirectional(test_list):
    """
    Write a function that analyzes a list of transaction pairs between bank accounts, where each pair represents a two-way money transfer relationship between customers, and counts the number of unique bidirectional transaction relationships. For example, if account A has transferred money to account B and account B has transferred money to account A, this counts as one bidirectional relationship, regardless of the order in which the transfers occurred.
    

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