




def 					lowerCAmelCase_			(	__a     ,   __a		)					->		List[str]:







  """simple docstring"""





  if b == 0:
    return 1
  if (b % 2) == 0:
    return actual_power(__a     ,   int(b / 2		)		) * actual_power(__a     ,   int(b / 2		)		)
  else:
    return a * actual_power(__a     ,   int(b / 2		)		) * actual_power(__a     ,   int(b / 2		)		)





def 					lowerCAmelCase_			(	__a     ,   __a		)					->		float:







  """simple docstring"""





  if b < 0:
    return 1 / actual_power(__a     ,   __a		)
  return actual_power(__a     ,   __a		)


if __name__ == "__main__":
     print(power(-2, -3))








import inspect
import os
import unittest

import torch

import accelerate
from accelerate import debug_launcher
from accelerate.test_utils import (
    execute_subprocess_async,
    require_cpu,
    require_huggingface_suite,
    require_multi_gpu,
    require_single_gpu,
)
from accelerate.utils import patch_environment



@require_huggingface_suite
class        _SCREAMING_SNAKE_CASE						(     unittest.TestCase   ):







 '''simple docstring'''

 def 							SCREAMING_SNAKE_CASE_ (self    :       Optional[int])	->Tuple:



   '''simple docstring'''



   lowerCamelCase__:				List[str]        =inspect.getfile(accelerate.test_utils)
   lowerCamelCase__:				str        =os.path.sep.join(
       mod_file.split(os.path.sep)[:-1] + ["scripts", "external_deps", "test_metrics.py"])

   from accelerate.test_utils.scripts.external_deps import test_metrics  # noqa: F401

   lowerCamelCase__:				str        =test_metrics

 @require_cpu
 def 							SCREAMING_SNAKE_CASE_ (self    :       int)	->Any:



   '''simple docstring'''



   debug_launcher(self.test_metrics.main	,			num_processes=1)

 @require_cpu
 def 							SCREAMING_SNAKE_CASE_ (self    :       int)	->int:



   '''simple docstring'''



   debug_launcher(self.test_metrics.main)

 @require_single_gpu
 def 							SCREAMING_SNAKE_CASE_ (self    :       Any)	->int:



   '''simple docstring'''



   self.test_metrics.main()







 @require_multi_gpu
 def 							SCREAMING_SNAKE_CASE_ (self    :       Tuple)	->Dict:



   '''simple docstring'''



   print(F"""Found {torch.cuda.device_count()} devices.""")
   lowerCamelCase__:				Optional[Any]        =["torchrun", F"""--nproc_per_node={torch.cuda.device_count()}""", self.test_file_path]
   with patch_environment(omp_num_threads=1):
     execute_subprocess_async(UpperCAmelCase_	,			env=os.environ.copy())

