def bytesToMac(addr_bytes):
    """Convert byte sequence into MAC address

    Byte sequence can comprise of both single character string elements, as
    well as byte-encoded string elements, which is extracted as an int. So we
    need to convert the character to its ordinal Unicode datapoint.

    b'\\xac\\x84\\xc6\\xc3\\xb14' (put \\ to escape in VS Code's hover hint)

    Here, except for the last byte, '4', the other 5 bytes are byte-encoded.
    After converting '4' -> '\\x34' = ord('4')
    Convert each integer to its hex encoding and strip off the '0x' prefix.
    """

    mac_addr = ""
    for c in addr_bytes:
        if isinstance(c, str):
            c = ord(c)
        mac_addr += hex(c)[2:].zfill(2) + ":"
    return mac_addr[:-1]