
    Design a function that analyzes social media interaction patterns by counting mutual engagement pairs between users, where each pair represents bidirectional interactions (like both users having liked or commented on each other's content). Given a list of user interaction tuples, determine how many unique pairs of users have reciprocal engagement with each other's content.
    

    
def count_bidirectional(test_list):
    """
    Design a function that analyzes social media interaction patterns by counting mutual engagement pairs between users, where each pair represents bidirectional interactions (like both users having liked or commented on each other's content). Given a list of user interaction tuples, determine how many unique pairs of users have reciprocal engagement with each other's content.
    

    """
def count_bidirectional(test_list):
    """
    Design a function that analyzes social media interaction patterns by counting mutual engagement pairs between users, where each pair represents bidirectional interactions (like both users having liked or commented on each other's content). Given a list of user interaction tuples, determine how many unique pairs of users have reciprocal engagement with each other's content.
    

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