
    Design a function for a social media platform's username generator that rearranges only the vowels in a user's display name while keeping consonants in their original positions to create unique variations when similar names exist. The function should process any given display name by reversing the positions of all vowels (excluding 'y') while maintaining the original placement of consonants, ensuring the generated username remains readable and recognizable.
    

    
def reverse_vowels(str1):
    """
    Design a function for a social media platform's username generator that rearranges only the vowels in a user's display name while keeping consonants in their original positions to create unique variations when similar names exist. The function should process any given display name by reversing the positions of all vowels (excluding 'y') while maintaining the original placement of consonants, ensuring the generated username remains readable and recognizable.
    

    """
def reverse_vowels(str1):
    """
    Design a function for a social media platform's username generator that rearranges only the vowels in a user's display name while keeping consonants in their original positions to create unique variations when similar names exist. The function should process any given display name by reversing the positions of all vowels (excluding 'y') while maintaining the original placement of consonants, ensuring the generated username remains readable and recognizable.
    

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