
    Write a function that takes a transaction identifier string and creates a secure variant by reversing only the positions of vowels while keeping consonants fixed in their original positions, which helps maintain tracking patterns while enhancing security in the fraud detection system. The function should treat 'y' as a consonant to align with existing banking code standards.
    

    
def reverse_vowels(str1):
    """
    Write a function that takes a transaction identifier string and creates a secure variant by reversing only the positions of vowels while keeping consonants fixed in their original positions, which helps maintain tracking patterns while enhancing security in the fraud detection system. The function should treat 'y' as a consonant to align with existing banking code standards.
    

    """
def reverse_vowels(str1):
    """
    Write a function that takes a transaction identifier string and creates a secure variant by reversing only the positions of vowels while keeping consonants fixed in their original positions, which helps maintain tracking patterns while enhancing security in the fraud detection system. The function should treat 'y' as a consonant to align with existing banking code standards.
    

    """
    vowels = ''
    for char in str1:
        if char in 'aeiouAEIOU':
            vowels += char
    result_string = ''
    for char in str1:
        if char in 'aeiouAEIOU':
            result_string += vowels[-1]
            vowels = vowels[:-1]
        else:
            result_string += char
    return result_string