def safe_decode(hex_encoded_string: str) -> bytes:
    """

    :param hex_encoded_string:
    :return:
    """
    if hex_encoded_string.startswith("0x"):
        return bytes.fromhex(hex_encoded_string[2:])
    else:
        return bytes.fromhex(hex_encoded_string)
def safe_decode ( hex_encoded_string : str ) -> bytes : if hex_encoded_string . startswith ( "0x" ) : return bytes . fromhex ( hex_encoded_string [ 2 : ] ) else : return bytes . fromhex ( hex_encoded_string )
:param hex_encoded_string:
    :return: