


from __future__ import annotations

import math





def   _UpperCAmelCase       (     UpperCAmelCase      :			int      ):
      """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   _UpperCAmelCase       (     UpperCAmelCase      :			int      ):
      """simple docstring"""




      __lowerCamelCase     :      List[str]       						=						str(UpperCAmelCase      )
      __lowerCamelCase     :      Dict       						=						[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   _UpperCAmelCase       (     UpperCAmelCase      :			int      ):
      """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   _UpperCAmelCase       (     UpperCAmelCase      :			int = 11      ):
      """simple docstring"""




      __lowerCamelCase     :      list[int]       						=						[]
      __lowerCamelCase     :      List[str]       						=						13
      while len(UpperCAmelCase      ) != count:
            if validate(UpperCAmelCase      ):
                  __lowerCamelCase     :      Dict       						=						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   _UpperCAmelCase       (     ):
      """simple docstring"""




      return sum(compute_truncated_primes(11      )      )


if __name__ == "__main__":
    print(F'''{sum(compute_truncated_primes(11)) = }''')







# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__UpperCamelCase    :						Any     =							{
    'configuration_mgp_str': ['MGP_STR_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MgpstrConfig'],
    'processing_mgp_str': ['MgpstrProcessor'],
    'tokenization_mgp_str': ['MgpstrTokenizer'],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __UpperCamelCase    :						Tuple     =							[
        'MGP_STR_PRETRAINED_MODEL_ARCHIVE_LIST',
        'MgpstrModel',
        'MgpstrPreTrainedModel',
        'MgpstrForSceneTextRecognition',
    ]

if TYPE_CHECKING:
    from .configuration_mgp_str import MGP_STR_PRETRAINED_CONFIG_ARCHIVE_MAP, MgpstrConfig
    from .processing_mgp_str import MgpstrProcessor
    from .tokenization_mgp_str import MgpstrTokenizer

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_mgp_str import (
            MGP_STR_PRETRAINED_MODEL_ARCHIVE_LIST,
            MgpstrForSceneTextRecognition,
            MgpstrModel,
            MgpstrPreTrainedModel,
        )
else:
    import sys

    __UpperCamelCase    :						Optional[Any]     =							_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



