


"""simple docstring"""

def 							A						(    snake_case				:str    , snake_case				:Optional[int]    , snake_case				:Union[str, Any]    , snake_case				:Union[str, Any]		)				->     Any:
 if height >= 1:
  move_tower(height - 1    , lowerCAmelCase__    , lowerCAmelCase__    , lowerCAmelCase__		)
  move_disk(lowerCAmelCase__    , lowerCAmelCase__		)
  move_tower(height - 1    , lowerCAmelCase__    , lowerCAmelCase__    , lowerCAmelCase__		)






def 							A						(    snake_case				:str    , snake_case				:Union[str, Any]		)				->     int:
 print('moving disk from'    , lowerCAmelCase__    , 'to'    , lowerCAmelCase__		)






def 							A						(    )				->     str:
 __UpperCamelCase      =	int(input('Height of hanoi: '		).strip()		)
 move_tower(lowerCAmelCase__    , 'A'    , 'B'    , 'C'		)


if __name__ == "__main__":
      main()





"""simple docstring"""

from typing import Union

import fire
import torch
from tqdm import tqdm






def 							A						(    snake_case				:str    , snake_case				:str = "cpu"    , snake_case				:Union[str, None] = None		)				->     None:
 __UpperCamelCase      =	torch.load(snake_case    , map_location=snake_case		)
 for k, v in tqdm(state_dict.items()		):
  if not isinstance(snake_case    , torch.Tensor		):
   raise TypeError('FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin'		)
  __UpperCamelCase      =	v.half()
 if save_path is None:  # overwrite src_path
  __UpperCamelCase      =	src_path
 torch.save(snake_case    , snake_case		)


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



