def read_response(self, long_timeout=False):
        """
        Try to read a single cbor (response) message from the underlying interface.
        If any 'log' messages are received, logs them locally at the nearest corresponding level
        and awaits the next message.  Returns when it receives what appears to be a reply message.
        If `long_timeout` is false, any read-timeout is respected.  If True, the call will block
        indefinitely awaiting a response message.

        Parameters
        ----------
        long_timeout : bool
            Whether to wait indefinitely for the next (response) message.

        Returns
        -------
        dict
            The message received, as a dict
        """
        while True:
            try:
                return self.read_cbor_message()
            except EOFError as e:
                if not long_timeout:
                    raise

        Try to read a single cbor (response) message from the underlying interface.
        If any 'log' messages are received, logs them locally at the nearest corresponding level
        and awaits the next message.  Returns when it receives what appears to be a reply message.
        If `long_timeout` is false, any read-timeout is respected.  If True, the call will block
        indefinitely awaiting a response message.

        Parameters
        ----------
        long_timeout : bool
            Whether to wait indefinitely for the next (response) message.

        Returns
        -------
        dict
            The message received, as a dict
        
electrum/plugins/jade/jadepy/jade.py