
    Given a list of user interest pairs where each pair represents two users who share common interests on a social network, write a function to identify the number of reciprocal interest matches between users. A reciprocal match occurs when two users have mutually indicated interest in each other's profiles, meaning both ('user1', 'user2') and ('user2', 'user1') exist in the list.
    

    
def count_bidirectional(test_list):
    """
    Given a list of user interest pairs where each pair represents two users who share common interests on a social network, write a function to identify the number of reciprocal interest matches between users. A reciprocal match occurs when two users have mutually indicated interest in each other's profiles, meaning both ('user1', 'user2') and ('user2', 'user1') exist in the list.
    

    """
def count_bidirectional(test_list):
    """
    Given a list of user interest pairs where each pair represents two users who share common interests on a social network, write a function to identify the number of reciprocal interest matches between users. A reciprocal match occurs when two users have mutually indicated interest in each other's profiles, meaning both ('user1', 'user2') and ('user2', 'user1') exist in the list.
    

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