'''simple docstring'''






import math





def  _SCREAMING_SNAKE_CASE		(      __snake_case							:			int				):
     assert isinstance(__snake_case   ,		__snake_case				) and (
         number >= 0
     ), "'number' must been an int and positive"

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

     _A    		=  range(3   ,		int(math.sqrt(__snake_case				) + 1				)   ,		2				)
     return not any(not number % i for i in odd_numbers				)





def  _SCREAMING_SNAKE_CASE		(      __snake_case							:			Tuple   ,		__snake_case							:			Dict=1   ,		**__snake_case							:			str				):
     _A    		=  factor * value
     _A    		=  value

     while not is_prime(__snake_case				):
          value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

     if value == first_value_val:
          return next_prime(value + 1   ,		**__snake_case				)
     return value




'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


_UpperCAmelCase    :     str         =       {
    '''configuration_vision_encoder_decoder''': ['''VisionEncoderDecoderConfig''', '''VisionEncoderDecoderOnnxConfig''']
}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase    :     Tuple         =       ['''VisionEncoderDecoderModel''']

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase    :     str         =       ['''TFVisionEncoderDecoderModel''']

try:
   if not is_flax_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase    :     Any         =       ['''FlaxVisionEncoderDecoderModel''']

if TYPE_CHECKING:
   from .configuration_vision_encoder_decoder import VisionEncoderDecoderConfig, VisionEncoderDecoderOnnxConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_vision_encoder_decoder import VisionEncoderDecoderModel

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_vision_encoder_decoder import TFVisionEncoderDecoderModel

   try:
      if not is_flax_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_flax_vision_encoder_decoder import FlaxVisionEncoderDecoderModel

else:
   import sys

   _UpperCAmelCase    :     List[str]         =       _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



