def validate_reply(request, reply):
        """
        Helper to minimally validate a reply message, in the context of a request.
        Asserts if the reply does contain the expected minimal fields.
        """
        assert isinstance(reply, dict) and 'id' in reply
        assert ('result' in reply) != ('error' in reply)
        assert reply['id'] == request['id'] or \
            reply['id'] == '00' and 'error' in reply

        Helper to minimally validate a reply message, in the context of a request.
        Asserts if the reply does contain the expected minimal fields.
        
electrum/plugins/jade/jadepy/jade.py