





"""simple docstring"""
import inspect
import os
import unittest
from pathlib import Path

import torch

import accelerate
from accelerate.test_utils import execute_subprocess_async
from accelerate.test_utils.testing import run_command






class 					_SCREAMING_SNAKE_CASE(   unittest.TestCase  ):
       SCREAMING_SNAKE_CASE_   :      Tuple							=  inspect.getfile(accelerate.test_utils  )
       SCREAMING_SNAKE_CASE_   :      Tuple							=  os.path.sep.join(mod_file.split(os.path.sep  )[:-1] + ['''scripts''', '''test_cli.py''']  )

       SCREAMING_SNAKE_CASE_   :      Union[str, Any]							=  ['''accelerate''', '''launch''']
       SCREAMING_SNAKE_CASE_   :      List[Any]							=  Path.home() / '''.cache/huggingface/accelerate'''
       SCREAMING_SNAKE_CASE_   :      List[str]							=  '''default_config.yaml'''
       SCREAMING_SNAKE_CASE_   :      List[str]							=  config_folder / config_file
       SCREAMING_SNAKE_CASE_   :      Optional[Any]							=  config_folder / '''_default_config.yaml'''

       SCREAMING_SNAKE_CASE_   :      Union[str, Any]							=  Path('''tests/test_configs'''  )




       @classmethod
       def     _UpperCamelCase     (						cls							)			->      Dict:





             """simple docstring"""






             if cls.config_path.is_file():
                   cls.config_path.rename(cls.changed_path							)




       @classmethod
       def     _UpperCamelCase     (						cls							)			->      int:





             """simple docstring"""






             if cls.changed_path.is_file():
                   cls.changed_path.rename(cls.config_path							)




       def     _UpperCamelCase     (						self							)			->      List[str]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :str						=  self.base_cmd
             if torch.cuda.is_available() and (torch.cuda.device_count() > 1):
                   cmd += ["--multi_gpu"]
             execute_subprocess_async(cmd + [self.test_file_path]		,env=os.environ.copy()							)




       def     _UpperCamelCase     (						self							)			->      int:





             """simple docstring"""






             for config in sorted(self.test_config_path.glob('''**/*.yaml'''							)							):
                   with self.subTest(config_file=SCREAMING_SNAKE_CASE__							):
                         execute_subprocess_async(
                             self.base_cmd + ['''--config_file''', str(SCREAMING_SNAKE_CASE__							), self.test_file_path]		,env=os.environ.copy()							)




       def     _UpperCamelCase     (						self							)			->      Optional[int]:





             """simple docstring"""






             execute_subprocess_async(['''accelerate''', '''test''']		,env=os.environ.copy()							)






class 					_SCREAMING_SNAKE_CASE(   unittest.TestCase  ):
       SCREAMING_SNAKE_CASE_   :      str							=  '''test-tpu'''
       SCREAMING_SNAKE_CASE_   :      str							=  '''us-central1-a'''
       SCREAMING_SNAKE_CASE_   :      str							=  '''ls'''
       SCREAMING_SNAKE_CASE_   :      Optional[int]							=  ['''accelerate''', '''tpu-config''']
       SCREAMING_SNAKE_CASE_   :      Union[str, Any]							=  '''cd /usr/share'''
       SCREAMING_SNAKE_CASE_   :      Any							=  '''tests/test_samples/test_command_file.sh'''
       SCREAMING_SNAKE_CASE_   :      str							=  '''Running gcloud compute tpus tpu-vm ssh'''




       def     _UpperCamelCase     (						self							)			->      List[str]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :Optional[int]						=  run_command(
                 self.cmd
                 + ['''--command''', self.command, '''--tpu_zone''', self.tpu_zone, '''--tpu_name''', self.tpu_name, '''--debug''']		,return_stdout=SCREAMING_SNAKE_CASE__		,)
             self.assertIn(
                 f'''{self.gcloud} test-tpu --zone us-central1-a --command {self.base_output}; ls --worker all'''		,SCREAMING_SNAKE_CASE__		,)




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





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :Dict						=  run_command(
                 self.cmd
                 + [
                     '''--config_file''',
                     '''tests/test_configs/0_12_0.yaml''',
                     '''--command''',
                     self.command,
                     '''--tpu_zone''',
                     self.tpu_zone,
                     '''--tpu_name''',
                     self.tpu_name,
                     '''--debug''',
                 ]		,return_stdout=SCREAMING_SNAKE_CASE__		,)
             self.assertIn(
                 f'''{self.gcloud} test-tpu --zone us-central1-a --command {self.base_output}; ls --worker all'''		,SCREAMING_SNAKE_CASE__		,)




       def     _UpperCamelCase     (						self							)			->      Any:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :Optional[int]						=  run_command(
                 self.cmd + ['''--config_file''', '''tests/test_configs/latest.yaml''', '''--debug''']		,return_stdout=SCREAMING_SNAKE_CASE__							)
             self.assertIn(
                 f'''{self.gcloud} test-tpu --zone us-central1-a --command {self.base_output}; echo "hello world"; echo "this is a second command" --worker all'''		,SCREAMING_SNAKE_CASE__		,)




       def     _UpperCamelCase     (						self							)			->      List[Any]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :List[str]						=  run_command(
                 self.cmd + ['''--config_file''', '''tests/test_configs/latest.yaml''', '''--command''', self.command, '''--debug''']		,return_stdout=SCREAMING_SNAKE_CASE__		,)
             self.assertIn(
                 f'''{self.gcloud} test-tpu --zone us-central1-a --command {self.base_output}; ls --worker all'''		,SCREAMING_SNAKE_CASE__		,)




       def     _UpperCamelCase     (						self							)			->      str:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  run_command(
                 self.cmd
                 + [
                     '''--config_file''',
                     '''tests/test_configs/latest.yaml''',
                     '''--command''',
                     self.command,
                     '''--command''',
                     '''echo "Hello World"''',
                     '''--debug''',
                 ]		,return_stdout=SCREAMING_SNAKE_CASE__		,)
             self.assertIn(
                 f'''{self.gcloud} test-tpu --zone us-central1-a --command {self.base_output}; ls; echo "Hello World" --worker all'''		,SCREAMING_SNAKE_CASE__		,)




       def     _UpperCamelCase     (						self							)			->      List[str]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :Tuple						=  run_command(
                 self.cmd
                 + ['''--config_file''', '''tests/test_configs/latest.yaml''', '''--command_file''', self.command_file, '''--debug''']		,return_stdout=SCREAMING_SNAKE_CASE__		,)
             self.assertIn(
                 f'''{self.gcloud} test-tpu --zone us-central1-a --command {self.base_output}; echo "hello world"; echo "this is a second command" --worker all'''		,SCREAMING_SNAKE_CASE__		,)




       def     _UpperCamelCase     (						self							)			->      Tuple:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :Dict						=  run_command(
                 self.cmd
                 + [
                     '''--config_file''',
                     '''tests/test_configs/0_12_0.yaml''',
                     '''--command_file''',
                     self.command_file,
                     '''--tpu_zone''',
                     self.tpu_zone,
                     '''--tpu_name''',
                     self.tpu_name,
                     '''--debug''',
                 ]		,return_stdout=SCREAMING_SNAKE_CASE__		,)
             self.assertIn(
                 f'''{self.gcloud} test-tpu --zone us-central1-a --command {self.base_output}; echo "hello world"; echo "this is a second command" --worker all'''		,SCREAMING_SNAKE_CASE__		,)




       def     _UpperCamelCase     (						self							)			->      List[str]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :int						=  run_command(
                 self.cmd + ['''--config_file''', '''tests/test_configs/latest.yaml''', '''--install_accelerate''', '''--debug''']		,return_stdout=SCREAMING_SNAKE_CASE__		,)
             self.assertIn(
                 f'''{self.gcloud} test-tpu --zone us-central1-a --command {self.base_output}; pip install accelerate -U; echo "hello world"; echo "this is a second command" --worker all'''		,SCREAMING_SNAKE_CASE__		,)




       def     _UpperCamelCase     (						self							)			->      Optional[Any]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :str						=  run_command(
                 self.cmd
                 + [
                     '''--config_file''',
                     '''tests/test_configs/latest.yaml''',
                     '''--install_accelerate''',
                     '''--accelerate_version''',
                     '''12.0.0''',
                     '''--debug''',
                 ]		,return_stdout=SCREAMING_SNAKE_CASE__		,)
             self.assertIn(
                 f'''{self.gcloud} test-tpu --zone us-central1-a --command {self.base_output}; pip install accelerate==12.0.0; echo "hello world"; echo "this is a second command" --worker all'''		,SCREAMING_SNAKE_CASE__		,)






"""simple docstring"""
def      __lowerCamelCase   (							a_     :		Union[str, Any]							)			->      Optional[int]:
      __SCREAMING_SNAKE_CASE   :List[str]						=  1
      __SCREAMING_SNAKE_CASE   :Dict						=  2
      while i * i <= n:
            __SCREAMING_SNAKE_CASE   :Tuple						=  0
            while n % i == 0:
                  n //= i
                  multiplicity += 1
            n_divisors *= multiplicity + 1
            i += 1
      if n > 1:
            n_divisors *= 2
      return n_divisors



def      __lowerCamelCase   (							)			->      int:
      __SCREAMING_SNAKE_CASE   :Dict						=  1
      __SCREAMING_SNAKE_CASE   :Dict						=  1

      while True:
            i += 1
            t_num += i

            if count_divisors(a_							) > 5_00:
                  break

      return t_num


if __name__ == "__main__":
  print(solution())