'''simple docstring'''





SCREAMING_SNAKE_CASE_:	dict[str, float]    ={
    "km/h": 1.0,
    "m/s": 3.6,
    "mph": 1.609344,
    "knot": 1.852,
}

SCREAMING_SNAKE_CASE_:	dict[str, float]    ={
    "km/h": 1.0,
    "m/s": 0.277777778,
    "mph": 0.621371192,
    "knot": 0.539956803,
}





def       lowerCAmelCase_							(   snake_case_			:					float   ,       snake_case_			:					str   ,       snake_case_			:					str     )       -> float:


     '''simple docstring'''




     if unit_to not in speed_chart or unit_from not in speed_chart_inverse:
          UpperCAmelCase_			       =  (
              f"""Incorrect 'from_type' or 'to_type' value: {unit_from!r}, {unit_to!r}\n"""
              f"""Valid values are: {", ".join(snake_case_     )}"""
          )
          raise ValueError(snake_case_     )
     return round(speed * speed_chart[unit_from] * speed_chart_inverse[unit_to]   ,       3     )


if __name__ == "__main__":
    import doctest

    doctest.testmod()








'''simple docstring'''






def 							UpperCamelCase_     (       A__   :  bytes   ):
  '''simple docstring'''





  return "".join([hex(A__   )[2:].zfill(2   ).upper() for byte in list(A__   )]   )







def 							UpperCamelCase_     (       A__   :  str   ):
  '''simple docstring'''





  if (len(A__   ) % 2) != 0:
    raise ValueError(
        """Base16 encoded data is invalid:
Data does not have an even number of hex digits."""   )
  # Check the character set - the standard base16 alphabet
  # is uppercase according to RFC3548 section 6
  if not set(A__   ) <= set("""0123456789ABCDEF"""   ):
    raise ValueError(
        """Base16 encoded data is invalid:
Data is not uppercase hex or it contains invalid characters."""   )
  # For every two hexadecimal digits (= a byte), turn it into an integer.
  # Then, string the result together into bytes, and return it.
  return bytes(int(data[i] + data[i + 1]				,       16   ) for i in range(0				,       len(A__   )				,       2   )   )


if __name__ == "__main__":
  import doctest

  doctest.testmod()



