


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




   if a < 0 or b < 0:
      raise ValueError("""the value of both inputs must be positive"""   )
   UpperCAmelCase							=     str(bin(lowerCAmelCase_   )   )[2:]  # remove the leading "0b"
   UpperCAmelCase							=     str(bin(lowerCAmelCase_   )   )[2:]
   UpperCAmelCase							=     max(len(lowerCAmelCase_   )  ,						len(lowerCAmelCase_   )   )
   return "0b" + "".join(
       str(int("""1""" in (char_a, char_b)   )   )
       for char_a, char_b in zip(a_binary.zfill(lowerCAmelCase_   )  ,						b_binary.zfill(lowerCAmelCase_   )   )   )


if __name__ == "__main__":
     import doctest

     doctest.testmod()







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   __lowercase				(  unittest.TestCase  ):





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






         """simple docstring"""







         UpperCAmelCase							=     torch.nn.Linear(1_0					,       1_0       )
         UpperCAmelCase							=     torch.optim.SGD(model.parameters()					,       0.1       )
         UpperCAmelCase							=     Accelerator()
         UpperCAmelCase							=     accelerator.prepare(__lowerCamelCase       )
         try:
            pickle.loads(pickle.dumps(__lowerCamelCase       )       )
         except Exception as e:
            self.fail(F"""Accelerated optimizer pickling failed with {e}"""       )
         AcceleratorState._reset_state()



