def hex_decode(data, errors='strict'):
    return (unicode(''.join('{:02X} '.format(ord(b)) for b in serial.iterbytes(data))), len(data))
b'@ab' -> '40 41 42'
dataset/ETHPy150Open pyserial/pyserial/serial/tools/hexlify_codec.py/hex_decode