




'''simple docstring'''


from typing import Optional, Union

import torch
from torch import nn

from ...configuration_utils import ConfigMixin, register_to_config
from ...models.modeling_utils import ModelMixin
class 						a_				(			UpperCAmelCase__     ,						UpperCAmelCase__						):




	@register_to_config
	def __init__(       self     :  Dict       ,		__lowerCAmelCase     :  int = 7_6_8       ,		):
							super().__init__()

							__snake_case						 =   nn.Parameter(torch.zeros(1       ,		__lowerCAmelCase      )      )
							__snake_case						 =   nn.Parameter(torch.ones(1       ,		__lowerCAmelCase      )      )




	def   lowercase__   (       self     :  int       ,		__lowerCAmelCase     :  Optional[Union[str, torch.device]] = None       ,		__lowerCAmelCase     :  Optional[torch.dtype] = None       ,		):
							__snake_case						 =   nn.Parameter(self.mean.to(__lowerCAmelCase      ).to(__lowerCAmelCase      )      )
							__snake_case						 =   nn.Parameter(self.std.to(__lowerCAmelCase      ).to(__lowerCAmelCase      )      )
							return self




	def   lowercase__   (       self     :  Optional[int]       ,		__lowerCAmelCase     :  Union[str, Any]      ):
							__snake_case						 =   (embeds - self.mean) * 1.0 / self.std
							return embeds




	def   lowercase__   (       self     :  str       ,		__lowerCAmelCase     :  List[str]      ):
							__snake_case						 =   (embeds * self.std) + self.mean
							return embeds







'''simple docstring'''


from collections import defaultdict
def 						lowerCamelCase__   (				a    ,	a							):
						__snake_case						 =   first_str.lower().strip()
						__snake_case						 =   second_str.lower().strip()

						# Remove whitespace
						__snake_case						 =   first_str.replace(' '    ,	''							)
						__snake_case						 =   second_str.replace(' '    ,	''							)

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

						# Default values for count should be 0
						__snake_case						 =   defaultdict(a							)

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

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

