



'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCamelCase__       :	List[Any]    = {'''configuration_ibert''': ['''IBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''IBertConfig''', '''IBertOnnxConfig''']}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						UpperCamelCase__       :	List[str]    = [
						    '''IBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''IBertForMaskedLM''',
						    '''IBertForMultipleChoice''',
						    '''IBertForQuestionAnswering''',
						    '''IBertForSequenceClassification''',
						    '''IBertForTokenClassification''',
						    '''IBertModel''',
						    '''IBertPreTrainedModel''',
						]

if TYPE_CHECKING:
						from .configuration_ibert import IBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, IBertConfig, IBertOnnxConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_ibert import (
												    IBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
												    IBertForMaskedLM,
												    IBertForMultipleChoice,
												    IBertForQuestionAnswering,
												    IBertForSequenceClassification,
												    IBertForTokenClassification,
												    IBertModel,
												    IBertPreTrainedModel,
												)

else:
						import sys

						UpperCamelCase__       :	Optional[int]    = _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




'''simple docstring'''




UpperCamelCase__       :	Optional[Any]    = [
    (10_00, '''M'''),
    (9_00, '''CM'''),
    (5_00, '''D'''),
    (4_00, '''CD'''),
    (1_00, '''C'''),
    (90, '''XC'''),
    (50, '''L'''),
    (40, '''XL'''),
    (10, '''X'''),
    (9, '''IX'''),
    (5, '''V'''),
    (4, '''IV'''),
    (1, '''I'''),
]


def 				lowerCAmelCase_   (	_lowerCamelCase:   str					):
		__SCREAMING_SNAKE_CASE       :		List[Any]           =		{"""I""": 1, """V""": 5, """X""": 10, """L""": 50, """C""": 1_00, """D""": 5_00, """M""": 10_00}
		__SCREAMING_SNAKE_CASE       :		Tuple           =		0
		__SCREAMING_SNAKE_CASE       :		str           =		0
		while place < len(_lowerCamelCase					):
				if (place + 1 < len(_lowerCamelCase					)) and (vals[roman[place]] < vals[roman[place + 1]]):
						total += vals[roman[place + 1]] - vals[roman[place]]
						place += 2
				else:
						total += vals[roman[place]]
						place += 1
		return total


def 				lowerCAmelCase_   (	_lowerCamelCase:   int					):
		__SCREAMING_SNAKE_CASE       :		Any           =		[]
		for arabic, roman in ROMAN:
				((__SCREAMING_SNAKE_CASE)       ,						(__SCREAMING_SNAKE_CASE))       :		str           =		divmod(_lowerCamelCase       ,      _lowerCamelCase					)
				result.append(roman * factor					)
				if number == 0:
						break
		return "".join(_lowerCamelCase					)


if __name__ == "__main__":
						import doctest

						doctest.testmod()