


'''simple docstring'''



from collections import defaultdict







def       _UpperCamelCase (						UpperCamelCase__	, UpperCamelCase__   ):
			UpperCAmelCase__					:   List[str]       				=       first_str.lower().strip()
			UpperCAmelCase__					:   Tuple       				=       second_str.lower().strip()

			# Remove whitespace
			UpperCAmelCase__					:   Union[str, Any]       				=       first_str.replace(""" """	, """"""   )
			UpperCAmelCase__					:   Union[str, Any]       				=       second_str.replace(""" """	, """"""   )

			# Strings of different lengths are not anagrams
			if len(UpperCamelCase__   ) != len(UpperCamelCase__   ):
						return False

			# Default values for count should be 0
			UpperCAmelCase__					:   defaultdict[str, int]       				=       defaultdict(UpperCamelCase__   )

			# For each character in input strings,
			# increment count in the corresponding
			for i in range(len(UpperCamelCase__   )   ):
						count[first_str[i]] += 1
						count[second_str[i]] -= 1

			return all(_count == 0 for _count in count.values()   )


if __name__ == "__main__":
		from doctest import testmod

		testmod()
		__A		=input('Enter the first string ').strip()
		__A		=input('Enter the second string ').strip()

		__A		=check_anagrams(input_a, input_b)
		print(f"""{input_a} and {input_b} are {'' if status else 'not '}anagrams.""")



'''simple docstring'''



from __future__ import annotations

import unittest

from transformers import is_tf_available
from transformers.testing_utils import require_sentencepiece, require_tf, require_tokenizers, slow


if is_tf_available():
		import tensorflow as tf

		from transformers import AutoTokenizer, TFAutoModelForSeqaSeqLM


@require_tf
@require_sentencepiece
@require_tokenizers
class 						_snake_case   (       unittest.TestCase		):




					@slow
					def 			snake_case__  ( self):
								UpperCAmelCase__					:   Optional[int]       				=       TFAutoModelForSeqaSeqLM.from_pretrained("""google/mt5-small""")
								UpperCAmelCase__					:   str       				=       AutoTokenizer.from_pretrained("""google/mt5-small""")

								UpperCAmelCase__					:   Optional[Any]       				=       tokenizer("""Hello there"""							,							return_tensors="""tf""").input_ids
								UpperCAmelCase__					:   Tuple       				=       tokenizer("""Hi I am"""							,							return_tensors="""tf""").input_ids

								UpperCAmelCase__					:   List[Any]       				=       model(_lowerCamelCase							,							labels=_lowerCamelCase).loss
								UpperCAmelCase__					:   Tuple       				=       -tf.math.reduce_mean(_lowerCamelCase).numpy()

								UpperCAmelCase__					:   Optional[int]       				=       -21.228168
								self.assertTrue(abs(mtf_score - EXPECTED_SCORE) < 2e-4)