

'''simple docstring'''
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


lowerCamelCase :      Tuple					 =     {
    "configuration_maskformer": ["MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP", "MaskFormerConfig"],
    "configuration_maskformer_swin": ["MaskFormerSwinConfig"],
}

try:
     if not is_vision_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCamelCase :      List[str]					 =     ["MaskFormerFeatureExtractor"]
     lowerCamelCase :      str					 =     ["MaskFormerImageProcessor"]


try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCamelCase :      int					 =     [
         "MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
         "MaskFormerForInstanceSegmentation",
         "MaskFormerModel",
         "MaskFormerPreTrainedModel",
     ]
     lowerCamelCase :      List[str]					 =     [
         "MaskFormerSwinBackbone",
         "MaskFormerSwinModel",
         "MaskFormerSwinPreTrainedModel",
     ]

if TYPE_CHECKING:
     from .configuration_maskformer import MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, MaskFormerConfig
     from .configuration_maskformer_swin import MaskFormerSwinConfig

     try:
          if not is_vision_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .feature_extraction_maskformer import MaskFormerFeatureExtractor
          from .image_processing_maskformer import MaskFormerImageProcessor
     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_maskformer import (
              MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
              MaskFormerForInstanceSegmentation,
              MaskFormerModel,
              MaskFormerPreTrainedModel,
          )
          from .modeling_maskformer_swin import (
              MaskFormerSwinBackbone,
              MaskFormerSwinModel,
              MaskFormerSwinPreTrainedModel,
          )


else:
     import sys

     lowerCamelCase :      int					 =     _LazyModule(__name__, globals()["__file__"], _import_structure)



'''simple docstring'''
from __future__ import annotations

import math


def        _lowerCAmelCase					(						_UpperCamelCase						:     int				)      ->			bool:
     """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(_UpperCamelCase				) + 1				)							, 6				):
          if number % i == 0 or number % (i + 2) == 0:
               return False
     return True


def        _lowerCAmelCase					(						_UpperCamelCase						:     int				)      ->			list[int]:
     """simple docstring"""




     _SCREAMING_SNAKE_CASE							    =str(_UpperCamelCase				)
     _SCREAMING_SNAKE_CASE							    =[n]
     for i in range(1							, len(_UpperCamelCase				)				):
          list_nums.append(int(str_num[i:]				)				)
          list_nums.append(int(str_num[:-i]				)				)
     return list_nums


def        _lowerCAmelCase					(						_UpperCamelCase						:     int				)      ->			bool:
     """simple docstring"""




     if len(str(_UpperCamelCase				)				) > 3:
          if not is_prime(int(str(_UpperCamelCase				)[-3:]				)				) or not is_prime(int(str(_UpperCamelCase				)[:3]				)				):
               return False
     return True


def        _lowerCAmelCase					(						_UpperCamelCase						:     int = 11				)      ->			list[int]:
     """simple docstring"""




     _SCREAMING_SNAKE_CASE							    =[]
     _SCREAMING_SNAKE_CASE							    =13
     while len(_UpperCamelCase				) != count:
          if validate(_UpperCamelCase				):
               _SCREAMING_SNAKE_CASE							    =list_truncated_nums(_UpperCamelCase				)
               if all(is_prime(_UpperCamelCase				) for i in list_nums				):
                    list_truncated_primes.append(_UpperCamelCase				)
          num += 2
     return list_truncated_primes


def        _lowerCAmelCase					(						)      ->			int:
     """simple docstring"""




     return sum(compute_truncated_primes(11				)				)


if __name__ == "__main__":
     print(f'''{sum(compute_truncated_primes(1_1)) = }''')
