



'''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			):







    def     lowercase_ (   self				:						Dict			):
      a		:      Optional[Any]       =  inspect.getfile(accelerate.test_utils			)
      a		:      Tuple       =  os.path.sep.join(mod_file.split(os.path.sep			)[:-1] + ['scripts', 'test_script.py']			)
      a		:      List[str]       =  os.path.sep.join(inspect.getfile(self.__class__			).split(os.path.sep			)[:-1]			)







    @require_tpu
    def     lowercase_ (   self				:						Optional[int]			):
      a		:      Tuple       =  F"""
            {self.test_dir}/xla_spawn.py
            --num_cores 8
            {self.test_file_path}
        """.split()
      a		:      str       =  [sys.executable] + distributed_args
      execute_subprocess_async(__snake_case		,    env=os.environ.copy()			)




'''simple docstring'''






from ..utils import DummyObject, requires_backends

class 							a__(      metaclass=lowerCamelCase__			):
    lowercase__				=					["""torch""", """torchsde"""]







    def __init__(   self				:						Any		,    *__snake_case				:						List[str]		,    **__snake_case				:						Tuple			):
      requires_backends(self		,    ['torch', 'torchsde']			)







    @classmethod
    def     lowercase_ (   cls				:						List[Any]		,    *__snake_case				:						str		,    **__snake_case				:						List[Any]			):
      requires_backends(cls		,    ['torch', 'torchsde']			)







    @classmethod
    def     lowercase_ (   cls				:						Dict		,    *__snake_case				:						Optional[Any]		,    **__snake_case				:						str			):
      requires_backends(cls		,    ['torch', 'torchsde']			)