



"""simple docstring"""






from ...utils import is_note_seq_available, is_transformers_available, is_torch_available
from ...utils import OptionalDependencyNotAvailable


try:
   if not (is_transformers_available() and is_torch_available()):
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
   from .notes_encoder import SpectrogramNotesEncoder
   from .continous_encoder import SpectrogramContEncoder
   from .pipeline_spectrogram_diffusion import (
       SpectrogramContEncoder,
       SpectrogramDiffusionPipeline,
       TaFilmDecoder,
   )

try:
   if not (is_transformers_available() and is_torch_available() and is_note_seq_available()):
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   from ...utils.dummy_transformers_and_torch_and_note_seq_objects import *  # noqa F403
else:
   from .midi_utils import MidiProcessor










from collections import defaultdict



def  a__ (__lowercase							:str					,  __lowercase							:str   )		-> bool:
				_A	:				Union[str, Any]   =      first_str.lower().strip()
				_A	:				int   =      second_str.lower().strip()

				# Remove whitespace
				_A	:				int   =      first_str.replace(''' '''					,  ''''''   )
				_A	:				Optional[Any]   =      second_str.replace(''' '''					,  ''''''   )

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

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

				# For each character in input strings,
				# increment count in the corresponding
				for i in range(len(__lowercase   )   ):
								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()
	_UpperCamelCase			:	Dict								=input('Enter the first string ').strip()
	_UpperCamelCase			:	Union[str, Any]								=input('Enter the second string ').strip()

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



