
    Given a list of paired patient vital sign measurements, where each pair represents the relationship between two health indicators and their impact on readmission risk, write a function to count how many unique bidirectional relationships exist between these health indicators. A bidirectional relationship means that if vital sign A is paired with vital sign B, then vital sign B paired with vital sign A should be counted as the same relationship for readmission risk assessment.
    

    
def count_bidirectional(test_list):
    """
    Given a list of paired patient vital sign measurements, where each pair represents the relationship between two health indicators and their impact on readmission risk, write a function to count how many unique bidirectional relationships exist between these health indicators. A bidirectional relationship means that if vital sign A is paired with vital sign B, then vital sign B paired with vital sign A should be counted as the same relationship for readmission risk assessment.
    

    """
def count_bidirectional(test_list):
    """
    Given a list of paired patient vital sign measurements, where each pair represents the relationship between two health indicators and their impact on readmission risk, write a function to count how many unique bidirectional relationships exist between these health indicators. A bidirectional relationship means that if vital sign A is paired with vital sign B, then vital sign B paired with vital sign A should be counted as the same relationship for readmission risk assessment.
    

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