
def   UpperCamelCase__     (    SCREAMING_SNAKE_CASE_  :  Optional[int]					)     ->    Union[str, Any]:
						return -num if num < 0 else num




def   UpperCamelCase__     (    SCREAMING_SNAKE_CASE_  :  Optional[int]					)     ->    Dict:


						if len(_A					) == 0:
												raise ValueError("""abs_min() arg is an empty sequence"""					)
						_lowercase									=				x[0]
						for i in x:
												if abs_val(_A					) < abs_val(_A					):
																		_lowercase									=				i
						return j




def   UpperCamelCase__     (    SCREAMING_SNAKE_CASE_  :  Tuple					)     ->    Union[str, Any]:


						if len(_A					) == 0:
												raise ValueError("""abs_max() arg is an empty sequence"""					)
						_lowercase									=				x[0]
						for i in x:
												if abs(_A					) > abs(_A					):
																		_lowercase									=				i
						return j




def   UpperCamelCase__     (    SCREAMING_SNAKE_CASE_  :  Tuple					)     ->    str:


						if len(_A					) == 0:
												raise ValueError("""abs_max_sort() arg is an empty sequence"""					)
						return sorted(_A		,      key=_A					)[-1]




def   UpperCamelCase__     (    )     ->    str:
						assert abs_val(0					) == 0
						assert abs_val(34					) == 34
						assert abs_val(-10_00_00_00_00_00					) == 10_00_00_00_00_00

						_lowercase									=				[-3, -1, 2, -11]
						assert abs_max(_A					) == -11
						assert abs_max_sort(_A					) == -11
						assert abs_min(_A					) == -1


if __name__ == "__main__":
		import doctest

		doctest.testmod()

		test_abs_val()
		print(abs_val(-34))  # --> 34

from typing import TYPE_CHECKING

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


A		:   Any         =    {'''configuration_bit''': ['''BIT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''BitConfig''', '''BitOnnxConfig''']}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A		:   Any         =    [
		    '''BIT_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''BitForImageClassification''',
		    '''BitModel''',
		    '''BitPreTrainedModel''',
		    '''BitBackbone''',
		]


try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A		:   Tuple         =    ['''BitImageProcessor''']


if TYPE_CHECKING:
		from .configuration_bit import BIT_PRETRAINED_CONFIG_ARCHIVE_MAP, BitConfig, BitOnnxConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_bit import (
				    BIT_PRETRAINED_MODEL_ARCHIVE_LIST,
				    BitBackbone,
				    BitForImageClassification,
				    BitModel,
				    BitPreTrainedModel,
				)

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .image_processing_bit import BitImageProcessor

else:
		import sys

		A		:   int         =    _LazyModule(__name__, globals()['''__file__'''], _import_structure)