


'''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 ViTImageProcessor
class  lowercase_					(   unittest.TestCase       ):


    def __init__(					self  , a  , a=7  , a=3  , a=18  , a=30  , a=4_00  , a=True  , a=None  , a=True  , a=[0.5, 0.5, 0.5]  , a=[0.5, 0.5, 0.5]  , ):
          UpperCamelCase__  =    size if size is not None else {"height": 18, "width": 18}
          UpperCamelCase__  =    parent
          UpperCamelCase__  =    batch_size
          UpperCamelCase__  =    num_channels
          UpperCamelCase__  =    image_size
          UpperCamelCase__  =    min_resolution
          UpperCamelCase__  =    max_resolution
          UpperCamelCase__  =    do_resize
          UpperCamelCase__  =    size
          UpperCamelCase__  =    do_normalize
          UpperCamelCase__  =    image_mean
          UpperCamelCase__  =    image_std


    def        __a							(					self   ):
          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  lowercase_					(   a__  ,						unittest.TestCase       ):
    __UpperCAmelCase             =     ViTImageProcessor if is_vision_available() else None


    def        __a							(					self   ):
          UpperCamelCase__  =    ViTImageProcessingTester(self   )


    @property
    def        __a							(					self   ):
          return self.image_processor_tester.prepare_image_processor_dict()


    def        __a							(					self   ):
          UpperCamelCase__  =    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        __a							(					self   ):
          UpperCamelCase__  =    self.image_processing_class.from_dict(self.image_processor_dict   )
          self.assertEqual(image_processor.size  , {"height": 18, "width": 18}   )

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


    def        __a							(					self   ):
          pass


    def        __a							(					self   ):
          # Initialize image_processing
          UpperCamelCase__  =    self.image_processing_class(**self.image_processor_dict   )
          # create random PIL images
          UpperCamelCase__  =    prepare_image_inputs(self.image_processor_tester  , equal_resolution=a   )
          for image in image_inputs:
                self.assertIsInstance(a  , Image.Image   )

          # Test not batched input
          UpperCamelCase__  =    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
          UpperCamelCase__  =    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        __a							(					self   ):
          # Initialize image_processing
          UpperCamelCase__  =    self.image_processing_class(**self.image_processor_dict   )
          # create random numpy tensors
          UpperCamelCase__  =    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
          UpperCamelCase__  =    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
          UpperCamelCase__  =    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        __a							(					self   ):
          # Initialize image_processing
          UpperCamelCase__  =    self.image_processing_class(**self.image_processor_dict   )
          # create random PyTorch tensors
          UpperCamelCase__  =    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
          UpperCamelCase__  =    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
          UpperCamelCase__  =    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"],
              )  , )









'''simple docstring'''







from itertools import permutations







def _UpperCamelCase	(					)							->		Optional[int]:


      '''simple docstring'''



      UpperCamelCase__  =    list(map("".join				,      permutations("0123456789"   )   )   )
      return result[999999]


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





