<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dispatch(self, action, event, compute_id):
 """ Notification received from compute node. Send it directly to clients or process it :param action: Action name :param event: Event to send :param compute_id: Compute id of the sender """

        if action == "node.updated":
            try:
                # Update controller node data and send the event node.updated
                project = self._controller.get_project(event["project_id"])
                node = project.get_node(event["node_id"])
                yield from node.parse_node_response(event)

                self.emit("node.updated", node.__json__())
            except (aiohttp.web.HTTPNotFound, aiohttp.web.HTTPForbidden):  # Project closing
                return
        elif action == "ping":
            event["compute_id"] = compute_id
            self.emit(action, event)
        else:
            self.emit(action, event)