





# 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


snake_case_				=			[
    'EAGER',
    'AOT_EAGER',
    'INDUCTOR',
    'NVFUSER',
    'AOT_NVFUSER',
    'AOT_CUDAGRAPHS',
    'OFI',
    'FX2TRT',
    'ONNXRT',
    'IPEX',
]






def lowerCamelCase__    (							snake_case_	:  List[Any]       ,      snake_case_	:  int=None       ,      snake_case_	:  Any=None       ,      snake_case_	:  Any=None       )      ->				Tuple:
   __snake_case							       =   True
   while ask_again:
      __snake_case							       =   input(snake_case_       )
      try:
         if default is not None and len(snake_case_       ) == 0:
            return default
         return convert_value(snake_case_       ) if convert_value is not None else result
      except Exception:
         if error_message is not None:
            print(snake_case_       )






def lowerCamelCase__    (							snake_case_	:  int       ,      snake_case_	:  Any=[]       ,      snake_case_	:  Optional[Any]=None       ,      snake_case_	:  int=0       )      ->				str:
   __snake_case							       =   BulletMenu(snake_case_       ,      snake_case_       )
   __snake_case							       =   menu.run(default_choice=snake_case_       )
   return convert_value(snake_case_       ) if convert_value is not None else result






def lowerCamelCase__    (							snake_case_	:  str       )      ->				str:
   __snake_case							       =   int(snake_case_       )
   return ComputeEnvironment(['''LOCAL_MACHINE''', '''AMAZON_SAGEMAKER'''][value]       )






def lowerCamelCase__    (							snake_case_	:  Optional[int]       )      ->				Optional[Any]:
   __snake_case							       =   int(snake_case_       )
   return DistributedType(['''NO''', '''MULTI_CPU''', '''MULTI_XPU''', '''MULTI_GPU''', '''MULTI_NPU''', '''TPU'''][value]       )






def lowerCamelCase__    (							snake_case_	:  int       )      ->				List[str]:
   __snake_case							       =   int(snake_case_       )
   return DynamoBackend(DYNAMO_BACKENDS[value]       ).value






def lowerCamelCase__    (							snake_case_	:  List[Any]       )      ->				Union[str, Any]:
   __snake_case							       =   int(snake_case_       )
   return PrecisionType(['''no''', '''fp16''', '''bf16''', '''fp8'''][value]       )






def lowerCamelCase__    (							snake_case_	:  List[Any]       )      ->				Any:
   __snake_case							       =   int(snake_case_       )
   return SageMakerDistributedType(['''NO''', '''DATA_PARALLEL''', '''MODEL_PARALLEL'''][value]       )






def lowerCamelCase__    (							snake_case_	:  Union[str, Any]       )      ->				str:
   return {"yes": True, "no": False}[value.lower()]







class 		SCREAMING_SNAKE_CASE__				(       argparse.RawDescriptionHelpFormatter  ):


      def    a (self       :      Any				,			a__       :      Dict				,			a__       :      Dict				,			a__       :      Optional[Any]				,			a__       :      str      ):





         """simple docstring"""



         __snake_case							       =   super()._format_usage(a__				,			a__				,			a__				,			a__      )
         __snake_case							       =   usage.replace('''<command> [<args>] '''				,			''''''      )
         return usage








def lowerCamelCase__    (							)      ->				int:
   return [
       a * b * (1000 - a - b)
       for a in range(1       ,      999       )
       for b in range(snake_case_       ,      999       )
       if (a * a + b * b == (1000 - a - b) ** 2)
   ][0]


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

