






from typing import Union

import fire
import torch
from tqdm import tqdm






def   UpperCamelCase  (       snake_case__     :   str	,snake_case__     :   str = "cpu"	,snake_case__     :   Union[str, None] = None  ):




     '''simple docstring'''






     __snake_case			:int          =						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"""  )
          __snake_case			:Optional[Any]          =						v.half()
     if save_path is None:  # overwrite src_path
          __snake_case			:str          =						src_path
     torch.save(snake_case__	,snake_case__  )


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










import math

lowerCamelCase__							=     10
lowerCamelCase__							=     7
lowerCamelCase__							=     BALLS_PER_COLOUR * NUM_COLOURS






def   UpperCamelCase  (       snake_case__     :   int = 20  ):




     '''simple docstring'''






     __snake_case			:Dict          =						math.comb(snake_case__	,snake_case__  )
     __snake_case			:int          =						math.comb(NUM_BALLS - BALLS_PER_COLOUR	,snake_case__  )

     __snake_case			:List[str]          =						NUM_COLOURS * (1 - missing_colour / total)

     return f'''{result:.9f}'''


if __name__ == "__main__":
     print(solution(20))


