code: def _handle_request(self, msg_id, method, params):
          
          try:
              handler = self._dispatcher[method]
          except KeyError:
              raise JsonRpcMethodNotFound.of(method)
  
          handler_result = handler(params)
  
          if callable(handler_result):
              log.debug("Executing async request handler %s", handler_result)
              request_future = self._executor_service.submit(handler_result)
              self._client_request_futures[msg_id] = request_future
              request_future.add_done_callback(self._request_callback(msg_id))
          else:
              log.debug("Got result from synchronous request handler: %s", handler_result)
              self._consumer({
                  'jsonrpc': JSONRPC_VERSION,
                  'id': msg_id,
                  'result': handler_result
              })
docs: Handle a request from the client.