'''simple docstring'''

# Copyright 2021 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.

import argparse

from ...utils.dataclasses import (
    ComputeEnvironment,
    DistributedType,
    DynamoBackend,
    PrecisionType,
    SageMakerDistributedType,
)
from ..menu import BulletMenu


lowerCAmelCase_ : List[Any]						  =      [
    "EAGER",
    "AOT_EAGER",
    "INDUCTOR",
    "NVFUSER",
    "AOT_NVFUSER",
    "AOT_CUDAGRAPHS",
    "OFI",
    "FX2TRT",
    "ONNXRT",
    "IPEX",
]


def __a (	__lowerCamelCase			:						Optional[Any] ,		__lowerCamelCase			:						str=None ,		__lowerCamelCase			:						Union[str, Any]=None ,		__lowerCamelCase			:						Dict=None				)	->							List[Any]:
      '''simple docstring'''


      lowercase_     =      True
      while ask_again:
            lowercase_     =      input(__lowerCamelCase				)
            try:
                  if default is not None and len(__lowerCamelCase				) == 0:
                        return default
                  return convert_value(__lowerCamelCase				) if convert_value is not None else result
            except Exception:
                  if error_message is not None:
                        print(__lowerCamelCase				)


def __a (	__lowerCamelCase			:						Optional[int] ,		__lowerCamelCase			:						str=[] ,		__lowerCamelCase			:						List[str]=None ,		__lowerCamelCase			:						Optional[Any]=0				)	->							Union[str, Any]:
      '''simple docstring'''


      lowercase_     =      BulletMenu(__lowerCamelCase ,		__lowerCamelCase				)
      lowercase_     =      menu.run(default_choice=__lowerCamelCase				)
      return convert_value(__lowerCamelCase				) if convert_value is not None else result


def __a (	__lowerCamelCase			:						str				)	->							Union[str, Any]:
      '''simple docstring'''


      lowercase_     =      int(__lowerCamelCase				)
      return ComputeEnvironment(["LOCAL_MACHINE", "AMAZON_SAGEMAKER"][value]				)


def __a (	__lowerCamelCase			:						Any				)	->							Optional[int]:
      '''simple docstring'''


      lowercase_     =      int(__lowerCamelCase				)
      return DistributedType(["NO", "MULTI_CPU", "MULTI_XPU", "MULTI_GPU", "MULTI_NPU", "TPU"][value]				)


def __a (	__lowerCamelCase			:						int				)	->							Union[str, Any]:
      '''simple docstring'''


      lowercase_     =      int(__lowerCamelCase				)
      return DynamoBackend(DYNAMO_BACKENDS[value]				).value


def __a (	__lowerCamelCase			:						Dict				)	->							Union[str, Any]:
      '''simple docstring'''


      lowercase_     =      int(__lowerCamelCase				)
      return PrecisionType(["no", "fp16", "bf16", "fp8"][value]				)


def __a (	__lowerCamelCase			:						Union[str, Any]				)	->							Any:
      '''simple docstring'''


      lowercase_     =      int(__lowerCamelCase				)
      return SageMakerDistributedType(["NO", "DATA_PARALLEL", "MODEL_PARALLEL"][value]				)


def __a (	__lowerCamelCase			:						List[Any]				)	->							Dict:
      '''simple docstring'''


      return {"yes": True, "no": False}[value.lower()]






class 							lowercase						(						argparse.RawDescriptionHelpFormatter ):


   def __UpperCAmelCase       (   self				:	Any   ,		__lowerCAmelCase				:	Tuple   ,		__lowerCAmelCase				:	Optional[Any]   ,		__lowerCAmelCase				:	Optional[int]   ,		__lowerCAmelCase				:	Dict)      ->					Optional[Any]:
         lowercase_     =      super()._format_usage(__lowerCAmelCase   ,		__lowerCAmelCase   ,		__lowerCAmelCase   ,		__lowerCAmelCase)
         lowercase_     =      usage.replace("<command> [<args>] "   ,		"")
         return usage







'''simple docstring'''

from __future__ import annotations


def __a (	__lowerCamelCase			:						int				)	->							list[int]:
      '''simple docstring'''


      lowercase_     =      [True] * limit
      lowercase_     =      False
      lowercase_     =      False
      lowercase_     =      True

      for i in range(3 ,		int(limit**0.5 + 1				) ,		2				):
            lowercase_     =      i * 2
            while index < limit:
                  lowercase_     =      False
                  lowercase_     =      index + i

      lowercase_     =      [2]

      for i in range(3 ,		__lowerCamelCase ,		2				):
            if is_prime[i]:
                  primes.append(__lowerCamelCase				)

      return primes


def __a (	__lowerCamelCase			:						int = 1_000_000				)	->							int:
      '''simple docstring'''


      lowercase_     =      prime_sieve(__lowerCamelCase				)
      lowercase_     =      0
      lowercase_     =      0

      for i in range(len(__lowerCamelCase				)				):
            for j in range(i + length ,		len(__lowerCamelCase				)				):
                  lowercase_     =      sum(primes[i:j]				)
                  if sol >= ceiling:
                        break

                  if sol in primes:
                        lowercase_     =      j - i
                        lowercase_     =      sol

      return largest


if __name__ == "__main__":
       print(F'''{solution() = }''')






