






"""simple docstring"""
def 			lowerCamelCase_    (		_lowerCamelCase     ,  _lowerCamelCase     ,  _lowerCamelCase							):

 if power < 0:
  return -1
 base %= mod
 lowerCamelCase__	:     str								=		1

 while power > 0:
  if power & 1:
   lowerCamelCase__	:     Optional[Any]								=		(result * base) % mod
  lowerCamelCase__	:     int								=		power >> 1
  lowerCamelCase__	:     Optional[Any]								=		(base * base) % mod

 return result






def 			lowerCamelCase_    (		):
 print(modular_exponential(3     ,  200     ,  13							)							)


if __name__ == "__main__":
      import doctest

      doctest.testmod()

      main()


"""simple docstring"""






import os
import unittest

import pytest
from parameterized import parameterized

from transformers.testing_utils import require_torch, require_torch_gpu, slow, torch_device


# skipping in unittest tests

lowerCAmelCase__    :    Union[str, Any]			=      [(1,)]



def     a_		(   ):
				UpperCAmelCase__			 =				bool(os.getenv('RUN_SLOW'   ,     0			)			)
				if run_slow:
								assert True
				else:
								assert False, "should have been skipped"



def     a_		(   ):
				UpperCAmelCase__			 =				bool(os.getenv('RUN_SLOW'   ,     0			)			)
				if run_slow and torch_device == "cuda":
								assert True
				else:
								assert False, "should have been skipped"
@require_torch
class 							snake_case			(					unittest.TestCase							):




					"""simple docstring"""

					@slow
					@require_torch_gpu
					def 						__lowerCAmelCase		(							self  :      Optional[Any]     ):
									check_slow_torch_cuda()







					@require_torch_gpu
					@slow
					def 						__lowerCAmelCase		(							self  :      Any     ):
									check_slow_torch_cuda()







					@parameterized.expand(lowerCamelCase__     )
					@slow
					def 						__lowerCAmelCase		(							self  :      Union[str, Any]       ,lowerCamelCase__  :      str=None     ):
									check_slow()






@slow
@require_torch_gpu
def     a_		(   ):
				check_slow_torch_cuda()



@require_torch_gpu
@slow
def     a_		(   ):
				check_slow_torch_cuda()



@slow
@pytest.mark.parametrize('param'   ,     [1]			)
def     a_		(   lowerCamelCase			):
				check_slow()







@pytest.mark.parametrize('param'   ,     [1]			)
@slow
def     a_		(   lowerCamelCase			):
				check_slow()



