<prompt> string str1 anagram; string str2 nagaram;Andika kazi ambayo inachukua kamba mbili kama hoja na anarudi kweli kama wao ni anagrams ya kila mmoja na uongo vinginevyo.  <response>: Here is an example implementation of the function in Python:pythondef is_anagramstr1, str2: If the strings have a different number of characters, they cannot be anagrams if lenstr1 ! lenstr2: return False Create a dictionary to count the number of characters in each string char_count Count the characters in the first string for char in str1: if char in char_count: char_countchar 1 else: char_countchar 1 Subtract the characters in the second string for char in str2: if char in char_count: char_countchar - 1 else: return False If any of the values in the char_count dictionary are not 0, then the strings are not anagrams for value in char_count.values: if value ! 0: return False return TrueLets test the function with the given input:pythonstr1 anagramstr2 nagaramprintis_anagramstr1, str2 True 