as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
create a function that takes two strings and checks if they are an anagram of each other.
user
def is_anagram(str1, str2):
    char_map1 = {}
    for char in str1:
        if char in char_map1:
            char_map1[char] += 1
        else:
            char_map1[char] = 1

    char_map2 = {}
    for char in str2:
        if char in char_map2:
            char_map2[char] += 1
        else:
            char_map2[char] = 1

    if char_map1 != char_map2:
        return false
    else:
        return true
assistant