






import PIL.Image
import PIL.ImageOps
from packaging import version
from PIL import Image


if version.parse(version.parse(PIL.__version__).base_version) >= version.parse("""9.1.0"""):
     lowerCamelCase__       		=  {
         """linear""": PIL.Image.Resampling.BILINEAR,
         """bilinear""": PIL.Image.Resampling.BILINEAR,
         """bicubic""": PIL.Image.Resampling.BICUBIC,
         """lanczos""": PIL.Image.Resampling.LANCZOS,
         """nearest""": PIL.Image.Resampling.NEAREST,
     }
else:
     lowerCamelCase__       		=  {
         """linear""": PIL.Image.LINEAR,
         """bilinear""": PIL.Image.BILINEAR,
         """bicubic""": PIL.Image.BICUBIC,
         """lanczos""": PIL.Image.LANCZOS,
         """nearest""": PIL.Image.NEAREST,
     }






def 	UpperCamelCase	(							snake_case__  : str	):




     '''simple docstring'''






     __snake_case      :List[str] 							=    (images / 2 + 0.5).clamp(0						,1	)
     __snake_case      :Optional[Any] 							=    images.cpu().permute(0						,2						,3						,1	).float().numpy()
     __snake_case      :Dict 							=    numpy_to_pil(lowerCAmelCase_	)
     return images






def 	UpperCamelCase	(							snake_case__  : Dict	):




     '''simple docstring'''






     if images.ndim == 3:
          __snake_case      :Dict 							=    images[None, ...]
     __snake_case      :Optional[Any] 							=    (images * 255).round().astype("""uint8"""	)
     if images.shape[-1] == 1:
          # special case for grayscale (single channel) images
          __snake_case      :Union[str, Any] 							=    [Image.fromarray(image.squeeze()						,mode="""L"""	) for image in images]
     else:
          __snake_case      :Optional[int] 							=    [Image.fromarray(lowerCAmelCase_	) for image in images]

     return pil_images






from __future__ import annotations

import math
def 	_UpperCamelCase					(    lowerCAmelCase_ )    ->bool:

   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(lowerCAmelCase_ ) + 1 )	,    6 ):
      if number % i == 0 or number % (i + 2) == 0:
         return False
   return True


__a	 =      [num for num in range(3, 10_0001, 2) if not is_prime(num)]
def 	_UpperCamelCase					(    lowerCAmelCase_ )    ->list[int]:
   if not isinstance(lowerCAmelCase_	,    lowerCAmelCase_ ):
      raise ValueError("""n must be an integer""" )
   if n <= 0:
      raise ValueError("""n must be >= 0""" )

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

   return []
def 	_UpperCamelCase					(    )    ->int:
   return compute_nums(1 )[0]


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



