<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compute_node_positions(self):
 """ Extracts the node positions based on the specified longitude and latitude keyword arguments. """

        xs = []
        ys = []
        self.locs = dict()

        for node in self.nodes:
            x = self.graph.node[node][self.node_lon]
            y = self.graph.node[node][self.node_lat]
            xs.append(x)
            ys.append(y)
            self.locs[node] = (x, y)

        self.node_coords = {"x": xs, "y": ys}