




'''simple docstring'''



import inspect
import os
import sys
import unittest

import accelerate
from accelerate.test_utils import execute_subprocess_async, require_tpu






class 							_a				(			unittest.TestCase ):





       '''simple docstring'''






       def        UpperCamelCase_							(      self  ):







             '''simple docstring'''







             SCREAMING_SNAKE_CASE   :      Dict    					=						inspect.getfile(accelerate.test_utils  )
             SCREAMING_SNAKE_CASE   :      str    					=						os.path.sep.join(mod_file.split(os.path.sep  )[:-1] + ['scripts', 'test_script.py']  )
             SCREAMING_SNAKE_CASE   :      Dict    					=						os.path.sep.join(inspect.getfile(self.__class__  ).split(os.path.sep  )[:-1]  )







       @require_tpu
       def        UpperCamelCase_							(      self  ):







             '''simple docstring'''







             SCREAMING_SNAKE_CASE   :      Any    					=						F"\n            {self.test_dir}/xla_spawn.py\n            --num_cores 8\n            {self.test_file_path}\n        ".split()
             SCREAMING_SNAKE_CASE   :      Any    					=						[sys.executable] + distributed_args
             execute_subprocess_async(A,							env=os.environ.copy()  )






from __future__ import annotations



def 							UpperCamelCase_( lowerCamelCase_					)       ->		float:
    if not nums:
        raise ValueError('List is empty'					)
    return sum(lowerCamelCase_					) / len(lowerCamelCase_					)


if __name__ == "__main__":
 import doctest

 doctest.testmod()


