user
Plase answer the following request: Create a function that takes two strings and checks if they are an anagram of each other.
Answer:
assistant
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