

"""simple docstring"""




from collections import defaultdict



def 					a__				(       snake_case__ ,				snake_case__       )		->      bool:
			lowerCamelCase       =      first_str.lower().strip()
			lowerCamelCase       =      second_str.lower().strip()

			# Remove whitespace
			lowerCamelCase       =      first_str.replace(""" """ ,				""""""       )
			lowerCamelCase       =      second_str.replace(""" """ ,				""""""       )

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

			# Default values for count should be 0
			lowerCamelCase       =      defaultdict(snake_case__       )

			# For each character in input strings,
			# increment count in the corresponding
			for i in range(len(snake_case__       )       ):
						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()
					lowerCAmelCase							:    Dict  							=							input("""Enter the first string """).strip()
					lowerCAmelCase							:    Any  							=							input("""Enter the second string """).strip()

					lowerCAmelCase							:    List[Any]  							=							check_anagrams(input_a, input_b)
					print(F"""{input_a} and {input_b} are {'' if status else 'not '}anagrams.""")









"""simple docstring"""




import tempfile
import unittest

from make_student import create_student_by_copying_alternating_layers

from transformers import AutoConfig
from transformers.file_utils import cached_property
from transformers.testing_utils import require_torch


lowerCAmelCase							:    Optional[Any]  							=							"""sshleifer/bart-tiny-random"""
lowerCAmelCase							:    List[Any]  							=							"""patrickvonplaten/t5-tiny-random"""






@require_torch
class 					__magic_name__							( unittest.TestCase       ):






				'''simple docstring'''





				@cached_property
				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							return AutoConfig.from_pretrained(_a				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=1				)
							self.assertEqual(student.config.num_hidden_layers	,				1				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=_a				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=_a				)
							self.assertEqual(student.config.encoder_layers	,				1				)
							self.assertEqual(student.config.decoder_layers	,				self.teacher_config.encoder_layers				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							lowerCamelCase   ,     *lowerCamelCase       =      create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=1	,				d=1				)
							self.assertEqual(student.config.encoder_layers	,				1				)
							self.assertEqual(student.config.decoder_layers	,				1				)





				def      _lowerCAmelCase       ( self				):





							"""simple docstring"""
							with self.assertRaises(_a				):
										create_student_by_copying_alternating_layers(_a	,				tempfile.mkdtemp()	,				e=_a	,				d=_a				)



