



'''simple docstring'''






from typing import Optional, Union

import torch
from torch import nn

from ...configuration_utils import ConfigMixin, register_to_config
from ...models.modeling_utils import ModelMixin

class 				SCREAMING_SNAKE_CASE(							UpperCamelCase__							,		UpperCamelCase__			):







	"""simple docstring"""






	@register_to_config
	def __init__(						self			:     List[Any]		,			__snake_case			:     int = 768		,			)			->		Optional[int]:
								super().__init__()

								UpperCAmelCase :       Dict 							=		nn.Parameter(torch.zeros(1		,			UpperCamelCase_		)		)
								UpperCAmelCase :       Optional[int] 							=		nn.Parameter(torch.ones(1		,			UpperCamelCase_		)		)







	def      A	(						self			:     List[str]		,			__snake_case			:     Optional[Union[str, torch.device]] = None		,			__snake_case			:     Optional[torch.dtype] = None		,			)			->		Any:
								UpperCAmelCase :       Tuple 							=		nn.Parameter(self.mean.to(UpperCamelCase_		).to(UpperCamelCase_		)		)
								UpperCAmelCase :       List[Any] 							=		nn.Parameter(self.std.to(UpperCamelCase_		).to(UpperCamelCase_		)		)
								return self







	def      A	(						self			:     Union[str, Any]		,			__snake_case			:     Any		)			->		Union[str, Any]:
								UpperCAmelCase :       List[Any] 							=		(embeds - self.mean) * 1.0 / self.std
								return embeds







	def      A	(						self			:     str		,			__snake_case			:     List[Any]		)			->		Optional[Any]:
								UpperCAmelCase :       List[Any] 							=		(embeds * self.std) + self.mean
								return embeds









def 			_a (      SCREAMING_SNAKE_CASE						,				SCREAMING_SNAKE_CASE						,				SCREAMING_SNAKE_CASE     ):


		"""simple docstring"""




		if exponent == 1:
				return base
		if exponent % 2 == 0:
				lowercase__            =      _modexpt(SCREAMING_SNAKE_CASE						,				exponent // 2						,				SCREAMING_SNAKE_CASE     ) % modulo_value
				return (x * x) % modulo_value
		else:
				return (base * _modexpt(SCREAMING_SNAKE_CASE						,				exponent - 1						,				SCREAMING_SNAKE_CASE     )) % modulo_value
def 			_a (      SCREAMING_SNAKE_CASE = 17_77						,				SCREAMING_SNAKE_CASE = 18_55						,				SCREAMING_SNAKE_CASE = 8     ):


		"""simple docstring"""




		lowercase__            =      base
		for _ in range(1						,				SCREAMING_SNAKE_CASE     ):
				lowercase__            =      _modexpt(SCREAMING_SNAKE_CASE						,				SCREAMING_SNAKE_CASE						,				10**digits     )

		return result


if __name__ == "__main__":
			print(f"""{solution() = }""")


