"""simple docstring"""






import warnings


warnings.warn(
    'memory_utils has been reorganized to utils.memory. Import `find_executable_batchsize` from the main `__init__`: '
    '`from accelerate import find_executable_batch_size` to avoid this warning.',
    FutureWarning,
)





"""simple docstring"""






def 						SCREAMING_SNAKE_CASE					(  __UpperCAmelCase       )							->   int:

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

				SCREAMING_SNAKE_CASE__		  =				0
				SCREAMING_SNAKE_CASE__		  =				str(__UpperCAmelCase       )

				while len(__UpperCAmelCase       ) != 1:
								SCREAMING_SNAKE_CASE__		  =				[int(__UpperCAmelCase       ) for i in num_string]

								SCREAMING_SNAKE_CASE__		  =				1
								for i in range(0  ,					len(__UpperCAmelCase       )       ):
												total *= numbers[i]

								SCREAMING_SNAKE_CASE__		  =				str(__UpperCAmelCase       )

								steps += 1
				return steps




def 						SCREAMING_SNAKE_CASE					(  __UpperCAmelCase       )							->   int:

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

				SCREAMING_SNAKE_CASE__		  =				0
				SCREAMING_SNAKE_CASE__		  =				str(__UpperCAmelCase       )

				while len(__UpperCAmelCase       ) != 1:
								SCREAMING_SNAKE_CASE__		  =				[int(__UpperCAmelCase       ) for i in num_string]

								SCREAMING_SNAKE_CASE__		  =				0
								for i in range(0  ,					len(__UpperCAmelCase       )       ):
												total += numbers[i]

								SCREAMING_SNAKE_CASE__		  =				str(__UpperCAmelCase       )

								steps += 1
				return steps


if __name__ == "__main__":
						import doctest

						doctest.testmod()




