



"""simple docstring"""






from collections import defaultdict






def 					snake_case__       (		__lowerCamelCase    :   str							,		__lowerCamelCase    :   str     ):
			"""simple docstring"""
			lowerCamelCase__		:		Dict		     =first_str.lower().strip()
			lowerCamelCase__		:		Tuple		     =second_str.lower().strip()

			# Remove whitespace
			lowerCamelCase__		:		int		     =first_str.replace(''' '''							,		''''''     )
			lowerCamelCase__		:		Tuple		     =second_str.replace(''' '''							,		''''''     )

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

			# Default values for count should be 0
			lowerCamelCase__		:		Optional[int]		     =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			:			Optional[Any]										=						input("Enter the first string ").strip()
		_lowercase			:			int										=						input("Enter the second string ").strip()

		_lowercase			:			Union[str, Any]										=						check_anagrams(input_a, input_b)
		print(f'{input_a} and {input_b} are {"" if status else "not "}anagrams.')









"""simple docstring"""






import unittest

import numpy as np
import torch

from diffusers import VersatileDiffusionImageVariationPipeline
from diffusers.utils.testing_utils import load_image, require_torch_gpu, slow, torch_device


_lowercase			:			Tuple										=						False

class 	__SCREAMING_SNAKE_CASE     (				unittest.TestCase       ):


					'''simple docstring'''





					pass





@slow
@require_torch_gpu
class 	__SCREAMING_SNAKE_CASE     (				unittest.TestCase       ):


					'''simple docstring'''





					def 		snake_case	(	self							:  List[Any]					)-> Dict:
								lowerCamelCase__		:		str		     =VersatileDiffusionImageVariationPipeline.from_pretrained('''shi-labs/versatile-diffusion'''					)
								pipe.to(lowerCamelCase					)
								pipe.set_progress_bar_config(disable=lowerCamelCase					)

								lowerCamelCase__		:		int		     =load_image(
								    '''https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/versatile_diffusion/benz.jpg'''					)
								lowerCamelCase__		:		Dict		     =torch.manual_seed(0					)
								lowerCamelCase__		:		str		     =pipe(
								    image=lowerCamelCase,  generator=lowerCamelCase,  guidance_scale=7.5,  num_inference_steps=50,  output_type='''numpy''',  ).images

								lowerCamelCase__		:		Dict		     =image[0, 253:256, 253:256, -1]

								assert image.shape == (1, 512, 512, 3)
								lowerCamelCase__		:		List[Any]		     =np.array([0.0_441, 0.0_469, 0.0_507, 0.0_575, 0.0_632, 0.0_650, 0.0_865, 0.0_909, 0.0_945]					)

								assert np.abs(image_slice.flatten() - expected_slice					).max() < 1E-2




