def check_key(key):
    if (type(key) is str):
        key = hex_str_to_bytes(key)
    if ((type(key) is bytes) and ((len(key) == 33) or (len(key) == 65))):
        return key
    assert False
def check_key(key):
    if (type(key) is str):
        key = hex_str_to_bytes(key)
    if ((type(key) is bytes) and ((len(key) == 33) or (len(key) == 65))):
        return key
    assert False