def pseudotime(starting_node, edges, fitted_vals):
<EOL>distances = np.array([[sum((x - y)**<NUM_LIT:2>) for x in fitted_vals.T] for y in fitted_vals.T])<EOL>distance_dict = graph_distances(starting_node, edges, distances)<EOL>output = []<EOL>for i in range(fitted_vals.shape[<NUM_LIT:1>]):<EOL><INDENT>output.append(distance_dict[i])<EOL><DEDENT>return np.array(output)<EOL>
Args:
    starting_node (int): index of the starting node
    edges (list): list of tuples (node1, node2)
    fitted_vals (array): output of lineage (2 x cells)

Returns:
    A 1d array containing the pseudotime value of each cell.