from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


lowerCamelCase_    :		Dict							=	{"""configuration_swin""": ["""SWIN_PRETRAINED_CONFIG_ARCHIVE_MAP""", """SwinConfig""", """SwinOnnxConfig"""]}


try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowerCamelCase_    :		int							=	[
	    """SWIN_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """SwinForImageClassification""",
	    """SwinForMaskedImageModeling""",
	    """SwinModel""",
	    """SwinPreTrainedModel""",
	    """SwinBackbone""",
	]

try:
	if not is_tf_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	lowerCamelCase_    :		Any							=	[
	    """TF_SWIN_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """TFSwinForImageClassification""",
	    """TFSwinForMaskedImageModeling""",
	    """TFSwinModel""",
	    """TFSwinPreTrainedModel""",
	]

if TYPE_CHECKING:
	from .configuration_swin import SWIN_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinConfig, SwinOnnxConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_swin import (
		    SWIN_PRETRAINED_MODEL_ARCHIVE_LIST,
		    SwinBackbone,
		    SwinForImageClassification,
		    SwinForMaskedImageModeling,
		    SwinModel,
		    SwinPreTrainedModel,
		)

	try:
		if not is_tf_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_tf_swin import (
		    TF_SWIN_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TFSwinForImageClassification,
		    TFSwinForMaskedImageModeling,
		    TFSwinModel,
		    TFSwinPreTrainedModel,
		)

else:
	import sys

	lowerCamelCase_    :		List[Any]							=	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





from collections import defaultdict
def 							lowerCAmelCase(     __lowerCamelCase				,    __lowerCamelCase						):
					__a		 =       first_str.lower().strip()
					__a		 =       second_str.lower().strip()

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

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

					# Default values for count should be 0
					__a		 =       defaultdict(__lowerCamelCase						)

					# For each character in input strings,
					# increment count in the corresponding
					for i in range(len(__lowerCamelCase						)						):
										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_    :		List[str]							=	input("""Enter the first string """).strip()
	lowerCamelCase_    :		Optional[Any]							=	input("""Enter the second string """).strip()

	lowerCamelCase_    :		str							=	check_anagrams(input_a, input_b)
	print(F'''{input_a} and {input_b} are {'' if status else 'not '}anagrams.''')




