
    Develop a function to analyze a sequence of patient readmission risk scores, where each score represents a patient's likelihood of returning to the hospital, and count the number of times a higher risk score appears before a lower risk score in the chronological sequence. This analysis helps identify inconsistencies in the hospital's risk prediction model, where a higher-risk patient who appeared earlier in the sequence ended up having fewer complications than a lower-risk patient who came later.
    

    
def get_Inv_Count(arr):
    """
    Develop a function to analyze a sequence of patient readmission risk scores, where each score represents a patient's likelihood of returning to the hospital, and count the number of times a higher risk score appears before a lower risk score in the chronological sequence. This analysis helps identify inconsistencies in the hospital's risk prediction model, where a higher-risk patient who appeared earlier in the sequence ended up having fewer complications than a lower-risk patient who came later.
    

    """
def get_Inv_Count(arr):
    """
    Develop a function to analyze a sequence of patient readmission risk scores, where each score represents a patient's likelihood of returning to the hospital, and count the number of times a higher risk score appears before a lower risk score in the chronological sequence. This analysis helps identify inconsistencies in the hospital's risk prediction model, where a higher-risk patient who appeared earlier in the sequence ended up having fewer complications than a lower-risk patient who came later.
    

    """
    inv_count = 0
    for i in range(len(arr)):
        for j in range(i + 1, len(arr)):
            if arr[i] > arr[j]:
                inv_count += 1
    return inv_count