



"""simple docstring"""
import math


def       _SCREAMING_SNAKE_CASE    (__lowerCAmelCase				)			->    Tuple:







  '''simple docstring'''


  assert isinstance(_UpperCamelCase			,	_UpperCamelCase				) 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

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


def       _SCREAMING_SNAKE_CASE    (__lowerCAmelCase			,	__lowerCAmelCase=1			,	**__lowerCAmelCase				)			->    Union[str, Any]:







  '''simple docstring'''


  lowercase_             =			factor * value
  lowercase_             =			value

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

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





"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


A	:  Union[str, Any]            =     {
    "configuration_timesformer": ["TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP", "TimesformerConfig"],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	A	:  Optional[int]            =     [
	    "TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
	    "TimesformerModel",
	    "TimesformerForVideoClassification",
	    "TimesformerPreTrainedModel",
	]

if TYPE_CHECKING:
	from .configuration_timesformer import TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, TimesformerConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_timesformer import (
		    TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TimesformerForVideoClassification,
		    TimesformerModel,
		    TimesformerPreTrainedModel,
		)

else:
	import sys

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




