<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_node(self, compute, name, node_id, dump=True, node_type=None, **kwargs):
 """ Create a node or return an existing node :param dump: Dump topology to disk :param kwargs: See the documentation of node """


        if node_id in self._nodes:
            return self._nodes[node_id]

        node = Node(self, compute, name, node_id=node_id, node_type=node_type, **kwargs)
        if compute not in self._project_created_on_compute:
            # For a local server we send the project path
            if compute.id == "local":
                yield from compute.post("/projects", data={
                    "name": self._name,
                    "project_id": self._id,
                    "path": self._path
                })
            else:
                yield from compute.post("/projects", data={
                    "name": self._name,
                    "project_id": self._id,
                })

            self._project_created_on_compute.add(compute)
        yield from node.create()
        self._nodes[node.id] = node
        self.controller.notification.emit("node.created", node.__json__())
        if dump:
            self.dump()
        return node