


def   _UpperCamelCase				(						lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_   )						->int:

   if exponent == 1:
      return base
   if exponent % 2 == 0:
      UpperCAmelCase							=     _modexpt(lowerCAmelCase_  ,						exponent // 2  ,						lowerCAmelCase_   ) % modulo_value
      return (x * x) % modulo_value
   else:
      return (base * _modexpt(lowerCAmelCase_  ,						exponent - 1  ,						lowerCAmelCase_   )) % modulo_value
def   _UpperCamelCase				(						lowerCAmelCase_ = 1_7_7_7  ,						lowerCAmelCase_ = 1_8_5_5  ,						lowerCAmelCase_ = 8   )						->int:
   UpperCAmelCase							=     base
   for _ in range(1  ,						lowerCAmelCase_   ):
      UpperCAmelCase							=     _modexpt(lowerCAmelCase_  ,						lowerCAmelCase_  ,						1_0**digits   )

   return result


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







import pickle
import unittest

import torch

from accelerate import Accelerator
from accelerate.state import AcceleratorState
from accelerate.test_utils import require_cpu






@require_cpu
class   __lowercase				(  unittest.TestCase  ):





      def        _lowercase				(		self						:					Any       )    ->   Union[str, Any]:






         """simple docstring"""







         UpperCAmelCase							=     torch.nn.Linear(1_0					,       1_0       )
         UpperCAmelCase							=     torch.optim.SGD(model.parameters()					,       0.1       )
         UpperCAmelCase							=     Accelerator()
         UpperCAmelCase							=     accelerator.prepare(__lowerCamelCase       )
         try:
            pickle.loads(pickle.dumps(__lowerCamelCase       )       )
         except Exception as e:
            self.fail(F"""Accelerated optimizer pickling failed with {e}"""       )
         AcceleratorState._reset_state()



