def to_hex(_bytes):
    """Encode `_bytes` as a colon-delemeted hexidecimal representation of each byte"""

    if type(_bytes) is str:
        _bytes = _bytes.encode()

    return ":".join("{:02x}".format(c) for c in _bytes)