




"""simple docstring"""

def 		_snake_case	(   _snake_case				:   str				)       ->   str:






      '''simple docstring'''


      if not all(char in '01' for char in bin_string				):
            raise ValueError('Non-binary value was passed to the function'				)
      if not bin_string:
            raise ValueError('Empty string was passed to the function'				)
      _A     =  ''
      while len(_snake_case				) % 3 != 0:
            _A     =  '0' + bin_string
      _A     =  [
          bin_string[index : index + 3]
          for index in range(len(_snake_case				)				)
          if index % 3 == 0
      ]
      for bin_group in bin_string_in_3_list:
            _A     =  0
            for index, val in enumerate(_snake_case				):
                  oct_val += int(2 ** (2 - index) * int(_snake_case				)				)
            oct_string += str(_snake_case				)
      return oct_string


if __name__ == "__main__":
       from doctest import testmod

       testmod()


"""simple docstring"""



from typing import Union

import fire
import torch
from tqdm import tqdm



def 	_lowerCamelCase(	a   ,    a = "cpu"   ,    a = None				):
       __a       =    torch.load(a   ,    map_location=a				)
       for k, v in tqdm(state_dict.items()				):
              if not isinstance(a   ,    torch.Tensor				):
                     raise TypeError("FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin"				)
              __a       =    v.half()
       if save_path is None:  # overwrite src_path
              __a       =    src_path
       torch.save(a   ,    a				)


if __name__ == "__main__":
   fire.Fire(convert)
