
'''simple docstring'''

import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_image_inputs


if is_torch_available():
		import torch

if is_vision_available():
		from PIL import Image

		from transformers import DeiTImageProcessor






class 				A       (		unittest.TestCase      ):





	def __init__(   self     :    Union[str, Any] ,							__magic_name__     :    int ,							__magic_name__     :    Union[str, Any]=7 ,							__magic_name__     :    List[str]=3 ,							__magic_name__     :    int=18 ,							__magic_name__     :    Tuple=30 ,							__magic_name__     :    Union[str, Any]=400 ,							__magic_name__     :    Any=True ,							__magic_name__     :    Union[str, Any]=None ,							__magic_name__     :    Optional[Any]=True ,							__magic_name__     :    List[str]=None ,							__magic_name__     :    Dict=True ,							__magic_name__     :    int=[0.5, 0.5, 0.5] ,							__magic_name__     :    int=[0.5, 0.5, 0.5] ,							):


				"""simple docstring"""

				lowerCAmelCase__									=							size if size is not None else {"height": 20, "width": 20}
				lowerCAmelCase__									=							crop_size if crop_size is not None else {"height": 18, "width": 18}

				lowerCAmelCase__									=							parent
				lowerCAmelCase__									=							batch_size
				lowerCAmelCase__									=							num_channels
				lowerCAmelCase__									=							image_size
				lowerCAmelCase__									=							min_resolution
				lowerCAmelCase__									=							max_resolution
				lowerCAmelCase__									=							do_resize
				lowerCAmelCase__									=							size
				lowerCAmelCase__									=							do_center_crop
				lowerCAmelCase__									=							crop_size
				lowerCAmelCase__									=							do_normalize
				lowerCAmelCase__									=							image_mean
				lowerCAmelCase__									=							image_std







	def 							__SCREAMING_SNAKE_CASE					(   self     :    List[Any]							):


				"""simple docstring"""

				return {
				    "do_resize": self.do_resize,
				    "size": self.size,
				    "do_center_crop": self.do_center_crop,
				    "crop_size": self.crop_size,
				    "do_normalize": self.do_normalize,
				    "image_mean": self.image_mean,
				    "image_std": self.image_std,
				}






@require_torch
@require_vision
class 				A       (		SCREAMING_SNAKE_CASE__					, unittest.TestCase      ):
	snake_case__ :Tuple				       =       DeiTImageProcessor if is_vision_available() else None
	snake_case__ :int				       =       True





	def 							__SCREAMING_SNAKE_CASE					(   self     :    str							):


				"""simple docstring"""

				lowerCAmelCase__									=							DeiTImageProcessingTester(self							)





	@property
	def 							__SCREAMING_SNAKE_CASE					(   self     :    Tuple							):


				"""simple docstring"""

				return self.image_processor_tester.prepare_image_processor_dict()





	def 							__SCREAMING_SNAKE_CASE					(   self     :    str							):


				"""simple docstring"""

				lowerCAmelCase__									=							self.image_processing_class(**self.image_processor_dict							)
				self.assertTrue(hasattr(__magic_name__ ,							"do_resize"							)							)
				self.assertTrue(hasattr(__magic_name__ ,							"size"							)							)
				self.assertTrue(hasattr(__magic_name__ ,							"do_center_crop"							)							)
				self.assertTrue(hasattr(__magic_name__ ,							"center_crop"							)							)
				self.assertTrue(hasattr(__magic_name__ ,							"do_normalize"							)							)
				self.assertTrue(hasattr(__magic_name__ ,							"image_mean"							)							)
				self.assertTrue(hasattr(__magic_name__ ,							"image_std"							)							)





	def 							__SCREAMING_SNAKE_CASE					(   self     :    List[str]							):


				"""simple docstring"""

				lowerCAmelCase__									=							self.image_processing_class.from_dict(self.image_processor_dict							)
				self.assertEqual(image_processor.size ,							{"height": 20, "width": 20}							)
				self.assertEqual(image_processor.crop_size ,							{"height": 18, "width": 18}							)

				lowerCAmelCase__									=							self.image_processing_class.from_dict(self.image_processor_dict ,							size=42 ,							crop_size=84							)
				self.assertEqual(image_processor.size ,							{"height": 42, "width": 42}							)
				self.assertEqual(image_processor.crop_size ,							{"height": 84, "width": 84}							)





	def 							__SCREAMING_SNAKE_CASE					(   self     :    Tuple							):


				"""simple docstring"""

				pass





	def 							__SCREAMING_SNAKE_CASE					(   self     :    str							):


				"""simple docstring"""

				lowerCAmelCase__									=							self.image_processing_class(**self.image_processor_dict							)
				# create random PIL images
				lowerCAmelCase__									=							prepare_image_inputs(self.image_processor_tester ,							equal_resolution=__magic_name__							)
				for image in image_inputs:
							self.assertIsInstance(__magic_name__ ,							Image.Image							)

				# Test not batched input
				lowerCAmelCase__									=							image_processing(image_inputs[0] ,							return_tensors="pt"							).pixel_values
				self.assertEqual(
				    encoded_images.shape ,							(
				        1,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.crop_size["height"],
				        self.image_processor_tester.crop_size["width"],
				    ) ,							)

				# Test batched
				lowerCAmelCase__									=							image_processing(__magic_name__ ,							return_tensors="pt"							).pixel_values
				self.assertEqual(
				    encoded_images.shape ,							(
				        self.image_processor_tester.batch_size,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.crop_size["height"],
				        self.image_processor_tester.crop_size["width"],
				    ) ,							)





	def 							__SCREAMING_SNAKE_CASE					(   self     :    List[str]							):


				"""simple docstring"""

				lowerCAmelCase__									=							self.image_processing_class(**self.image_processor_dict							)
				# create random numpy tensors
				lowerCAmelCase__									=							prepare_image_inputs(self.image_processor_tester ,							equal_resolution=__magic_name__ ,							numpify=__magic_name__							)
				for image in image_inputs:
							self.assertIsInstance(__magic_name__ ,							np.ndarray							)

				# Test not batched input
				lowerCAmelCase__									=							image_processing(image_inputs[0] ,							return_tensors="pt"							).pixel_values
				self.assertEqual(
				    encoded_images.shape ,							(
				        1,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.crop_size["height"],
				        self.image_processor_tester.crop_size["width"],
				    ) ,							)

				# Test batched
				lowerCAmelCase__									=							image_processing(__magic_name__ ,							return_tensors="pt"							).pixel_values
				self.assertEqual(
				    encoded_images.shape ,							(
				        self.image_processor_tester.batch_size,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.crop_size["height"],
				        self.image_processor_tester.crop_size["width"],
				    ) ,							)







	def 							__SCREAMING_SNAKE_CASE					(   self     :    Dict							):


				"""simple docstring"""

				lowerCAmelCase__									=							self.image_processing_class(**self.image_processor_dict							)
				# create random PyTorch tensors
				lowerCAmelCase__									=							prepare_image_inputs(self.image_processor_tester ,							equal_resolution=__magic_name__ ,							torchify=__magic_name__							)
				for image in image_inputs:
							self.assertIsInstance(__magic_name__ ,							torch.Tensor							)

				# Test not batched input
				lowerCAmelCase__									=							image_processing(image_inputs[0] ,							return_tensors="pt"							).pixel_values
				self.assertEqual(
				    encoded_images.shape ,							(
				        1,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.crop_size["height"],
				        self.image_processor_tester.crop_size["width"],
				    ) ,							)

				# Test batched
				lowerCAmelCase__									=							image_processing(__magic_name__ ,							return_tensors="pt"							).pixel_values
				self.assertEqual(
				    encoded_images.shape ,							(
				        self.image_processor_tester.batch_size,
				        self.image_processor_tester.num_channels,
				        self.image_processor_tester.crop_size["height"],
				        self.image_processor_tester.crop_size["width"],
				    ) ,							)







'''simple docstring'''

def 					A       ( )   ->    str:







			'''simple docstring'''



			lowerCAmelCase__									=							1

			while True:
						if (
						    sorted(str(UpperCamelCase_ ) )
						    == sorted(str(2 * i ) )
						    == sorted(str(3 * i ) )
						    == sorted(str(4 * i ) )
						    == sorted(str(5 * i ) )
						    == sorted(str(6 * i ) )
						):
									return i

						i += 1


if __name__ == "__main__":
		print(solution())





