






def   SCREAMING_SNAKE_CASE_				(				__magic_name__   :    int   )						->     int:






	"""simple docstring"""



	barcode //= 10  # exclude the last digit
	UpperCamelCase	:Any		=      False
	UpperCamelCase	:List[Any]		=      0

	# extract and check each digit
	while barcode != 0:
		UpperCamelCase	:Optional[Any]		=      1 if checker else 3
		s += mult * (barcode % 10)
		barcode //= 10
		UpperCamelCase	:Dict		=      not checker

	return (10 - (s % 10)) % 10

def   SCREAMING_SNAKE_CASE_				(				__magic_name__   :    int   )						->     bool:






	"""simple docstring"""



	return len(str(__magic_name__   )   ) == 13 and get_check_digit(__magic_name__   ) == barcode % 10

def   SCREAMING_SNAKE_CASE_				(				__magic_name__   :    str   )						->     int:






	"""simple docstring"""



	if str(__magic_name__   ).isalpha():
		UpperCamelCase	:Tuple		=      f"""Barcode '{barcode}' has alphabetic characters."""
		raise ValueError(__magic_name__   )
	elif int(__magic_name__   ) < 0:
		raise ValueError("""The entered barcode has a negative value. Try again."""   )
	else:
		return int(__magic_name__   )


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	UpperCAmelCase_					:		Dict           = get_barcode(input('''Barcode: ''').strip())

	if is_valid(barcode):
		print(F'''\'{barcode}\' is a valid barcode.''')
	else:
		print(F'''\'{barcode}\' is NOT a valid barcode.''')








from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


UpperCAmelCase_					:		int           = {
    '''configuration_unispeech_sat''': ['''UNISPEECH_SAT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''UniSpeechSatConfig'''],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCAmelCase_					:		Tuple           = [
	    '''UNISPEECH_SAT_PRETRAINED_MODEL_ARCHIVE_LIST''',
	    '''UniSpeechSatForAudioFrameClassification''',
	    '''UniSpeechSatForCTC''',
	    '''UniSpeechSatForPreTraining''',
	    '''UniSpeechSatForSequenceClassification''',
	    '''UniSpeechSatForXVector''',
	    '''UniSpeechSatModel''',
	    '''UniSpeechSatPreTrainedModel''',
	]

if TYPE_CHECKING:
	from .configuration_unispeech_sat import UNISPEECH_SAT_PRETRAINED_CONFIG_ARCHIVE_MAP, UniSpeechSatConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_unispeech_sat import (
		    UNISPEECH_SAT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    UniSpeechSatForAudioFrameClassification,
		    UniSpeechSatForCTC,
		    UniSpeechSatForPreTraining,
		    UniSpeechSatForSequenceClassification,
		    UniSpeechSatForXVector,
		    UniSpeechSatModel,
		    UniSpeechSatPreTrainedModel,
		)

else:
	import sys

	UpperCAmelCase_					:		str           = _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
