






'''simple docstring'''





import importlib
import os
from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, Optional, Union

import torch

from ..utils import BaseOutput


_UpperCamelCase						:						Optional[Any]  =					'scheduler_config.json'


class  snake_case__      (					UpperCamelCase):
					a_        =					1
					a_        =					2
					a_        =					3
					a_        =					4
					a_        =					5
					a_        =					6
					a_        =					7
					a_        =					8
					a_        =					9
					a_        =					10
					a_        =					11
					a_        =					12
					a_        =					13
					a_        =					14






@dataclass
class  snake_case__      (					UpperCamelCase):
					a_        =					42






class  snake_case__      :
					a_        =					SCHEDULER_CONFIG_NAME
					a_        =					[]
					a_        =					True




					@classmethod
					def 		A      (  cls  :		List[Any]				, _A  :		Dict[str, Any] = None				, _A  :		Optional[str] = None				, _A  :		Union[str, Any]=False				, **_A  :		Dict				, )    ->							Tuple:
								UpperCAmelCase_    ,      UpperCAmelCase_    ,      UpperCAmelCase_      :       Union[str, Any]          =       cls.load_config(
								    pretrained_model_name_or_path=_A				, subfolder=_A				, return_unused_kwargs=_A				, return_commit_hash=_A				, **_A				, )
								return cls.from_config(_A				, return_unused_kwargs=_A				, **_A      )




					def 		A      (  self  :		Tuple				, _A  :		Union[str, os.PathLike]				, _A  :		bool = False				, **_A  :		Any      )    ->							Union[str, Any]:
								self.save_config(save_directory=_A				, push_to_hub=_A				, **_A      )




					@property
					def 		A      (  self  :		Optional[int]      )    ->							str:
								return self._get_compatibles()





					@classmethod
					def 		A      (  cls  :		Union[str, Any]      )    ->							Tuple:
								UpperCAmelCase_      :       Optional[Any]          =       list(set([cls.__name__] + cls._compatibles      )      )
								UpperCAmelCase_      :       Optional[int]          =       importlib.import_module(__name__.split('''.'''      )[0]      )
								UpperCAmelCase_      :       List[Any]          =       [
								    getattr(_A				, _A      ) for c in compatible_classes_str if hasattr(_A				, _A      )
								]
								return compatible_classes










'''simple docstring'''





_UpperCamelCase						:						List[str]  =					[sum(int(c, 10) ** 2 for c in i.__str__()) for i in range(100_000)]
def __UpperCAmelCase   (					A					:			int		)    ->   int:
			UpperCAmelCase_      :       str          =       0
			while number:
						# Increased Speed Slightly by checking every 5 digits together.
						sum_of_digits_squared += DIGITS_SQUARED[number % 1_0_0_0_0_0]
						number //= 1_0_0_0_0_0

			return sum_of_digits_squared


# There are 2 Chains made,
# One ends with 89 with the chain member 58 being the one which when declared first,
# there will be the least number of iterations for all the members to be checked.

# The other one ends with 1 and has only one element 1.

# So 58 and 1 are chosen to be declared at the starting.

# Changed dictionary to an array to quicken the solution
_UpperCamelCase						:						list[bool | None]  =					[None] * 10_000_000
_UpperCamelCase						:						List[str]  =					True
_UpperCamelCase						:						Tuple  =					False
def __UpperCAmelCase   (					A					:			int		)    ->   bool:

			if CHAINS[number - 1] is not None:
						return CHAINS[number - 1]  # type: ignore

			UpperCAmelCase_      :       Dict          =       chain(next_number(A		)		)
			UpperCAmelCase_      :       int          =       number_chain

			while number < 1_0_0_0_0_0_0_0:
						UpperCAmelCase_      :       Optional[Any]          =       number_chain
						number *= 1_0

			return number_chain
def __UpperCAmelCase   (					A					:			int = 1_0_0_0_0_0_0_0		)    ->   int:
			for i in range(1			,       A		):
						if CHAINS[i] is None:
									chain(i + 1		)

			return CHAINS[:number].count(A		)


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						print(f'''{solution() = }''')


