docs: def response_message(cls, result, request_id):
          '''Convert a response result (or RPCError) to a message.'''
          if isinstance(result, CodeMessageError):
              payload = cls.error_payload(result, request_id)
          else:
              payload = cls.response_payload(result, request_id)
          return cls.encode_payload(payload)