
"""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


_A						=			[
    'EAGER',
    'AOT_EAGER',
    'INDUCTOR',
    'NVFUSER',
    'AOT_NVFUSER',
    'AOT_CUDAGRAPHS',
    'OFI',
    'FX2TRT',
    'ONNXRT',
    'IPEX',
]
def 		UpperCAmelCase (		a_,						a_=None,						a_=None,						a_=None      ):





		'''simple docstring'''


		lowerCamelCase					:      Optional[int]          =   True
		while ask_again:
				lowerCamelCase					:      Optional[Any]          =   input(a_      )
				try:
						if default is not None and len(a_      ) == 0:
								return default
						return convert_value(a_      ) if convert_value is not None else result
				except Exception:
						if error_message is not None:
								print(a_      )
def 		UpperCAmelCase (		a_,						a_=[],						a_=None,						a_=0      ):





		'''simple docstring'''


		lowerCamelCase					:      Dict          =   BulletMenu(a_,						a_      )
		lowerCamelCase					:      List[Any]          =   menu.run(default_choice=a_      )
		return convert_value(a_      ) if convert_value is not None else result
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      str          =   int(a_      )
		return ComputeEnvironment(['LOCAL_MACHINE', 'AMAZON_SAGEMAKER'][value]      )
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      List[Any]          =   int(a_      )
		return DistributedType(['NO', 'MULTI_CPU', 'MULTI_XPU', 'MULTI_GPU', 'MULTI_NPU', 'TPU'][value]      )
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      Tuple          =   int(a_      )
		return DynamoBackend(DYNAMO_BACKENDS[value]      ).value
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      Tuple          =   int(a_      )
		return PrecisionType(['no', 'fp16', 'bf16', 'fp8'][value]      )
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      str          =   int(a_      )
		return SageMakerDistributedType(['NO', 'DATA_PARALLEL', 'MODEL_PARALLEL'][value]      )
def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


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






class 	_lowercase       (    argparse.RawDescriptionHelpFormatter		):




	def       _UpperCamelCase   (			self		,			UpperCAmelCase_		,			UpperCAmelCase_		,			UpperCAmelCase_		,			UpperCAmelCase_ )		->							List[str]:
			lowerCamelCase					:      Tuple          =   super()._format_usage(UpperCAmelCase_		,			UpperCAmelCase_		,			UpperCAmelCase_		,			UpperCAmelCase_ )
			lowerCamelCase					:      Dict          =   usage.replace('<command> [<args>] '		,			'' )
			return usage








"""simple docstring"""

def 		UpperCAmelCase (		a_ = 10      ):





		'''simple docstring'''


		if not isinstance(a_,						a_      ) or n < 0:
				raise ValueError('Invalid input'      )
		lowerCamelCase					:      Union[str, Any]          =   10**n
		lowerCamelCase					:      int          =   2_8433 * (pow(2,						783_0457,						a_      )) + 1
		return str(number % modulus      )


if __name__ == "__main__":
					from doctest import testmod

					testmod()
					print(F"""{solution(1_0) = }""")






