"""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 GLPNImageProcessor






class    a__    (   unittest.TestCase	):


   def __init__(     self,				_UpperCAmelCase,				_UpperCAmelCase=7,				_UpperCAmelCase=3,				_UpperCAmelCase=18,				_UpperCAmelCase=30,				_UpperCAmelCase=400,				_UpperCAmelCase=True,				_UpperCAmelCase=32,				_UpperCAmelCase=True,				):
        '''simple docstring'''



        lowercase__				 =							parent
        lowercase__				 =							batch_size
        lowercase__				 =							num_channels
        lowercase__				 =							image_size
        lowercase__				 =							min_resolution
        lowercase__				 =							max_resolution
        lowercase__				 =							do_resize
        lowercase__				 =							size_divisor
        lowercase__				 =							do_rescale


   def 	snake_case__	(     self  ):
        '''simple docstring'''



        return {
            "do_resize": self.do_resize,
            "size_divisor": self.size_divisor,
            "do_rescale": self.do_rescale,
        }






@require_torch
@require_vision
class    a__    (   _a					,					unittest.TestCase	):
   snake_case_							=      GLPNImageProcessor if is_vision_available() else None


   def 	snake_case__	(     self  ):
        '''simple docstring'''



        lowercase__				 =							GLPNImageProcessingTester(self  )


   @property
   def 	snake_case__	(     self  ):
        '''simple docstring'''



        return self.image_processor_tester.prepare_image_processor_dict()


   def 	snake_case__	(     self  ):
        '''simple docstring'''



        lowercase__				 =							self.image_processing_class(**self.image_processor_dict  )
        self.assertTrue(hasattr(_UpperCAmelCase,				"do_resize"  )  )
        self.assertTrue(hasattr(_UpperCAmelCase,				"size_divisor"  )  )
        self.assertTrue(hasattr(_UpperCAmelCase,				"resample"  )  )
        self.assertTrue(hasattr(_UpperCAmelCase,				"do_rescale"  )  )


   def 	snake_case__	(     self  ):
        '''simple docstring'''



        pass


   def 	snake_case__	(     self  ):
        '''simple docstring'''



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

        # Test not batched input (GLPNImageProcessor doesn't support batching)
        lowercase__				 =							image_processing(image_inputs[0],				return_tensors="pt"  ).pixel_values
        self.assertTrue(encoded_images.shape[-1] % self.image_processor_tester.size_divisor == 0  )
        self.assertTrue(encoded_images.shape[-2] % self.image_processor_tester.size_divisor == 0  )


   def 	snake_case__	(     self  ):
        '''simple docstring'''



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

        # Test not batched input (GLPNImageProcessor doesn't support batching)
        lowercase__				 =							image_processing(image_inputs[0],				return_tensors="pt"  ).pixel_values
        self.assertTrue(encoded_images.shape[-1] % self.image_processor_tester.size_divisor == 0  )
        self.assertTrue(encoded_images.shape[-2] % self.image_processor_tester.size_divisor == 0  )


   def 	snake_case__	(     self  ):
        '''simple docstring'''



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

        # Test not batched input (GLPNImageProcessor doesn't support batching)
        lowercase__				 =							image_processing(image_inputs[0],				return_tensors="pt"  ).pixel_values
        self.assertTrue(encoded_images.shape[-1] % self.image_processor_tester.size_divisor == 0  )
        self.assertTrue(encoded_images.shape[-2] % self.image_processor_tester.size_divisor == 0  )





"""simple docstring"""


from __future__ import annotations

import math







def 					__a   (		A      ):






     '''simple docstring'''



     if 1 < number < 4:
          # 2 and 3 are primes
          return True
     elif number < 2 or number % 2 == 0 or number % 3 == 0:
          # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
          return False

     # All primes number are in format of 6k +/- 1
     for i in range(5    ,				int(math.sqrt(A      ) + 1      )    ,				6      ):
          if number % i == 0 or number % (i + 2) == 0:
               return False
     return True


lowerCAmelCase_:					Optional[Any]     =					[num for num in range(3, 1_0_0_0_0_1, 2) if not is_prime(num)]







def 					__a   (		A      ):






     '''simple docstring'''



     if not isinstance(A    ,				A      ):
          raise ValueError("n must be an integer"      )
     if n <= 0:
          raise ValueError("n must be >= 0"      )

     lowercase__				 =							[]
     for num in range(len(A      )      ):
          lowercase__				 =							0
          while 2 * i * i <= odd_composites[num]:
               lowercase__				 =							odd_composites[num] - 2 * i * i
               if is_prime(A      ):
                    break
               i += 1
          else:
               list_nums.append(odd_composites[num]      )
               if len(A      ) == n:
                    return list_nums

     return []







def 					__a   (		):






     '''simple docstring'''



     return compute_nums(1      )[0]


if __name__ == "__main__":
 print(F'{solution() = }')




