

from typing import TYPE_CHECKING

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


__A     						=      {
    'configuration_segformer': ['SEGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP', 'SegformerConfig', 'SegformerOnnxConfig']
}

try:
 if not is_vision_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __A     						=      ['SegformerFeatureExtractor']
 __A     						=      ['SegformerImageProcessor']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __A     						=      [
     'SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
     'SegformerDecodeHead',
     'SegformerForImageClassification',
     'SegformerForSemanticSegmentation',
     'SegformerLayer',
     'SegformerModel',
     'SegformerPreTrainedModel',
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __A     						=      [
     'TF_SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFSegformerDecodeHead',
     'TFSegformerForImageClassification',
     'TFSegformerForSemanticSegmentation',
     'TFSegformerModel',
     'TFSegformerPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_segformer import SEGFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, SegformerConfig, SegformerOnnxConfig

 try:
  if not is_vision_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .feature_extraction_segformer import SegformerFeatureExtractor
  from .image_processing_segformer import SegformerImageProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_segformer import (
      SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
      SegformerDecodeHead,
      SegformerForImageClassification,
      SegformerForSemanticSegmentation,
      SegformerLayer,
      SegformerModel,
      SegformerPreTrainedModel,
  )
 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_segformer import (
      TF_SEGFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFSegformerDecodeHead,
      TFSegformerForImageClassification,
      TFSegformerForSemanticSegmentation,
      TFSegformerModel,
      TFSegformerPreTrainedModel,
  )

else:
 import sys

 __A     						=      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)






from itertools import compress, repeat
from math import ceil, sqrt
def 						snake_case__							(       __lowercase							)		->		list[int]:







						"""simple docstring"""

						if num <= 2:
												return []
						if num == 3:
												return [2]

						# Odd sieve for numbers in range [3, num - 1]
						A__						:				Dict         =			bytearray(b"\x01"							) * ((num >> 1) - 1)

						for i in range(3				,  int(sqrt(__lowercase							)							) + 1				,  2							):
												if sieve[(i >> 1) - 1]:
																		A__						:				int         =			i**2
																		A__						:				List[str]         =			repeat(
																		    0				,  ceil((num - i_squared) / (i << 1)							)							)

						return [2] + list(compress(range(3				,  __lowercase				,  2							)				,  __lowercase							)							)


if __name__ == "__main__":
		import doctest

		doctest.testmod()