





'''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 EfficientNetImageProcessor





class     _UpperCAmelCase							(						unittest.TestCase   ):
		def __init__(  self,__SCREAMING_SNAKE_CASE,__SCREAMING_SNAKE_CASE=13,__SCREAMING_SNAKE_CASE=3,__SCREAMING_SNAKE_CASE=18,__SCREAMING_SNAKE_CASE=30,__SCREAMING_SNAKE_CASE=4_00,__SCREAMING_SNAKE_CASE=True,__SCREAMING_SNAKE_CASE=None,__SCREAMING_SNAKE_CASE=True,__SCREAMING_SNAKE_CASE=[0.5, 0.5, 0.5],__SCREAMING_SNAKE_CASE=[0.5, 0.5, 0.5],):



					'''simple docstring'''

					__lowerCAmelCase											=				size if 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_normalize
					__lowerCAmelCase											=				image_mean
					__lowerCAmelCase											=				image_std







		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

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





@require_torch
@require_vision
class     _UpperCAmelCase							(						lowerCAmelCase__	,					unittest.TestCase   ):
		a   :   Tuple     =EfficientNetImageProcessor if is_vision_available() else None
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					__lowerCAmelCase											=				EfficientNetImageProcessorTester(self			)
		@property
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					return self.image_processor_tester.prepare_image_processor_dict()
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

					__lowerCAmelCase											=				self.image_processing_class(**self.image_processor_dict			)
					self.assertTrue(hasattr(_A,"""image_mean"""			)			)
					self.assertTrue(hasattr(_A,"""image_std"""			)			)
					self.assertTrue(hasattr(_A,"""do_normalize"""			)			)
					self.assertTrue(hasattr(_A,"""do_resize"""			)			)
					self.assertTrue(hasattr(_A,"""size"""			)			)
		def   lowerCamelCase__			(  self			):



					'''simple docstring'''

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

					__lowerCAmelCase											=				self.image_processing_class.from_dict(self.image_processor_dict,size=42			)
					self.assertEqual(image_processor.size,{"""height""": 42, """width""": 42}			)
		def   lowerCamelCase__			(  self			):



					'''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=_A			)
					for image in image_inputs:
								self.assertIsInstance(_A,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.size["""height"""],
					        self.image_processor_tester.size["""width"""],
					    ),)

					# Test batched
					__lowerCAmelCase											=				image_processing(_A,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.size["""height"""],
					        self.image_processor_tester.size["""width"""],
					    ),)
		def   lowerCamelCase__			(  self			):



					'''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=_A,numpify=_A			)
					for image in image_inputs:
								self.assertIsInstance(_A,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.size["""height"""],
					        self.image_processor_tester.size["""width"""],
					    ),)

					# Test batched
					__lowerCAmelCase											=				image_processing(_A,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.size["""height"""],
					        self.image_processor_tester.size["""width"""],
					    ),)







		def   lowerCamelCase__			(  self			):



					'''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=_A,torchify=_A			)
					for image in image_inputs:
								self.assertIsInstance(_A,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.size["""height"""],
					        self.image_processor_tester.size["""width"""],
					    ),)

					# Test batched
					__lowerCAmelCase											=				image_processing(_A,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.size["""height"""],
					        self.image_processor_tester.size["""width"""],
					    ),)




from itertools import permutations


def     _UpperCAmelCase				(     ):





    """simple docstring"""


    SCREAMING_SNAKE_CASE_													=  list(map(''.join       ,      permutations('0123456789'				)				)				)
    return result[999_999]


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


