

"""simple docstring"""




import pickle
import unittest

import torch

from accelerate import Accelerator
from accelerate.state import AcceleratorState
from accelerate.test_utils import require_cpu


@require_cpu
class 		_A       (			unittest.TestCase					):





      def 					_lowerCamelCase  (  self		)   ->					Optional[int]:
         lowerCamelCase__						=			torch.nn.Linear(10    ,						10		)
         lowerCamelCase__						=			torch.optim.SGD(model.parameters()    ,						0.1		)
         lowerCamelCase__						=			Accelerator()
         lowerCamelCase__						=			accelerator.prepare(SCREAMING_SNAKE_CASE__		)
         try:
            pickle.loads(pickle.dumps(SCREAMING_SNAKE_CASE__		)		)
         except Exception as e:
            self.fail(f'Accelerated optimizer pickling failed with {e}'		)
         AcceleratorState._reset_state()







"""simple docstring"""




def 	UpperCAmelCase__   (				A__   )      ->      str:




   """simple docstring"""
   return " ".join(input_str.split()[::-1]   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()




