



'''simple docstring'''



a__						:			dict[str, float]										=			{
    "kilogram": 1,
    "gram": pow(1_0, 3),
    "milligram": pow(1_0, 6),
    "metric-ton": pow(1_0, -3),
    "long-ton": 0.00_09_84_20_73,
    "short-ton": 0.00_11_02_31_22,
    "pound": 2.20_46_24_42_02,
    "stone": 0.15_74_73_17_28,
    "ounce": 35.2_73_99_07_23,
    "carrat": 5_0_0_0,
    "atomic-mass-unit": 6.022136652e26,
}

a__						:			dict[str, float]										=			{
    "kilogram": 1,
    "gram": pow(1_0, -3),
    "milligram": pow(1_0, -6),
    "metric-ton": pow(1_0, 3),
    "long-ton": 10_16.0_46_08,
    "short-ton": 9_07.1_84,
    "pound": 0.45_35_92,
    "stone": 6.3_50_29,
    "ounce": 0.0_28_34_95,
    "carrat": 0.00_02,
    "atomic-mass-unit": 1.660540199e-27,
}







def _lowercase   (  __A							,__A							,__A       ):



 '''simple docstring'''



 if to_type not in KILOGRAM_CHART or from_type not in WEIGHT_TYPE_CHART:
  __UpperCamelCase				      =  (
      f"Invalid 'from_type' or 'to_type' value: {from_type!r}, {to_type!r}\n"
      f"Supported values are: {', '.join(__A       )}"
  )
  raise ValueError(__A       )
 return value * KILOGRAM_CHART[to_type] * WEIGHT_TYPE_CHART[from_type]


if __name__ == "__main__":
 import doctest

 doctest.testmod()










'''simple docstring'''



a__						:			Any										=			{
    '0000': '0',
    '0001': '1',
    '0010': '2',
    '0011': '3',
    '0100': '4',
    '0101': '5',
    '0110': '6',
    '0111': '7',
    '1000': '8',
    '1001': '9',
    '1010': 'a',
    '1011': 'b',
    '1100': 'c',
    '1101': 'd',
    '1110': 'e',
    '1111': 'f',
}







def _lowercase   (  __A       ):



 '''simple docstring'''



 __UpperCamelCase				      =  str(__A       ).strip()

 # Exceptions
 if not binary_str:
  raise ValueError("""Empty string was passed to the function"""       )
 __UpperCamelCase				      =  binary_str[0] == """-"""
 __UpperCamelCase				      =  binary_str[1:] if is_negative else binary_str
 if not all(char in """01""" for char in binary_str       ):
  raise ValueError("""Non-binary value was passed to the function"""       )

 __UpperCamelCase				      =  (
     """0""" * (4 * (divmod(len(__A       )							,4       )[0] + 1) - len(__A       )) + binary_str
 )

 __UpperCamelCase				      =  []
 for x in range(0							,len(__A       )							,4       ):
  hexadecimal.append(BITS_TO_HEX[binary_str[x : x + 4]]       )
 __UpperCamelCase				      =  """0x""" + """""".join(__A       )

 return "-" + hexadecimal_str if is_negative else hexadecimal_str


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

 testmod()





