def _hexlify(data):
    """
    Helper to map bytes-like types into hex-strings
    to make for prettier message-logging.

    Parameters
    ----------
    data : any
        The object to hexlify.
        - bytes or bytearrays have 'hex()' method invoked
        - list and dicts (values) have this function mapped over them
        - Otherwise the input is returned unchanged
    """
    if data is None:
        return None
    elif isinstance(data, bytes) or isinstance(data, bytearray):
        return data.hex()
    elif isinstance(data, list):
        return [_hexlify(item) for item in data]
    elif isinstance(data, dict):
        return {k: _hexlify(v) for k, v in data.items()}
    else:
        return data

    Helper to map bytes-like types into hex-strings
    to make for prettier message-logging.

    Parameters
    ----------
    data : any
        The object to hexlify.
        - bytes or bytearrays have 'hex()' method invoked
        - list and dicts (values) have this function mapped over them
        - Otherwise the input is returned unchanged
    
electrum/plugins/jade/jadepy/jade.py