
    Write a function that calculates the total sum of stable monthly expenses (represented by even dollar amounts) that occur at regular billing cycles (even-indexed positions) in a client's transaction history list, helping identify predictable spending patterns for financial planning purposes.
    

    
def sum_even_and_even_index(arr):
    """
    Write a function that calculates the total sum of stable monthly expenses (represented by even dollar amounts) that occur at regular billing cycles (even-indexed positions) in a client's transaction history list, helping identify predictable spending patterns for financial planning purposes.
    

    """
def sum_even_and_even_index(arr):
    """
    Write a function that calculates the total sum of stable monthly expenses (represented by even dollar amounts) that occur at regular billing cycles (even-indexed positions) in a client's transaction history list, helping identify predictable spending patterns for financial planning purposes.
    

    """
    i = 0
    sum = 0
    for i in range(0, len(arr), 2):
        if arr[i] % 2 == 0:
            sum += arr[i]
    return sum