

def 			lowerCamelCase__			(       _a):

	if not isinstance(_a				,      _a):
		raise ValueError("multiplicative_persistence() only accepts integral values")
	if num < 0:
		raise ValueError("multiplicative_persistence() does not accept negative values")

	SCREAMING_SNAKE_CASE :   int					  =							0
	SCREAMING_SNAKE_CASE :   List[Any]					  =							str(_a)

	while len(_a) != 1:
		SCREAMING_SNAKE_CASE :   Tuple					  =							[int(_a) for i in num_string]

		SCREAMING_SNAKE_CASE :   Optional[int]					  =							1
		for i in range(0				,      len(_a)):
			total *= numbers[i]

		SCREAMING_SNAKE_CASE :   Dict					  =							str(_a)

		steps += 1
	return steps

def 			lowerCamelCase__			(       _a):

	if not isinstance(_a				,      _a):
		raise ValueError("additive_persistence() only accepts integral values")
	if num < 0:
		raise ValueError("additive_persistence() does not accept negative values")

	SCREAMING_SNAKE_CASE :   Tuple					  =							0
	SCREAMING_SNAKE_CASE :   Union[str, Any]					  =							str(_a)

	while len(_a) != 1:
		SCREAMING_SNAKE_CASE :   str					  =							[int(_a) for i in num_string]

		SCREAMING_SNAKE_CASE :   Tuple					  =							0
		for i in range(0				,      len(_a)):
			total += numbers[i]

		SCREAMING_SNAKE_CASE :   Any					  =							str(_a)

		steps += 1
	return steps


if __name__ == "__main__":
			import doctest

			doctest.testmod()






"""simple docstring"""






from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__UpperCAmelCase						=			{
    '''configuration_informer''': [
        '''INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''InformerConfig''',
    ],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__UpperCAmelCase						=			[
		    '''INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''InformerForPrediction''',
		    '''InformerModel''',
		    '''InformerPreTrainedModel''',
		]


if TYPE_CHECKING:
		from .configuration_informer import INFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, InformerConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_informer import (
				    INFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
				    InformerForPrediction,
				    InformerModel,
				    InformerPreTrainedModel,
				)

else:
		import sys

		__UpperCAmelCase						=			_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)