docs: def receive_message(self, message):
          '''Call with an unframed message received from the network.
  
          Raises: ProtocolError if the message violates the protocol in
          some way.  However, if it happened in a response that can be
          paired with a request, the ProtocolError is instead set in the
          result attribute of the send_request() that caused the error.
          '''
          if self._protocol is JSONRPCAutoDetect:
              self._protocol = JSONRPCAutoDetect.detect_protocol(message)
  
          try:
              item, request_id = self._protocol.message_to_item(message)
          except ProtocolError as e:
              if e.response_msg_id is not id:
                  return self._receive_response(e, e.response_msg_id)
              raise
  
          if isinstance(item, Request):
              item.send_result = partial(self._send_result, request_id)
              return [item]
          if isinstance(item, Notification):
              return [item]
          if isinstance(item, Response):
              return self._receive_response(item.result, request_id)
  
          assert isinstance(item, list)
          if all(isinstance(payload, dict) and ('result' in payload or 'error' in payload)
                 for payload in item):
              return self._receive_response_batch(item)
          else:
              return self._receive_request_batch(item)