code: def send_message(
          self, request: str, response_expected: bool, **kwargs: Any
      ) -> Response:
          
          self.socket.send_string(request)
          return Response(self.socket.recv().decode())
docs: Transport the message to the server and return the response.
  
          Args:
              request: The JSON-RPC request string.
              response_expected: Whether the request expects a response.
  
          Returns:
              A Response object.