parameters: (self, node_to_cost)
docstring: Updates the cost of nodes, according to |node_to_cost|.
  
      Args:
        node_to_cost: (Callable) RequestNode -> float. Callable returning the cost
                      of a node.
docstring_summary: Updates the cost of nodes, according to |node_to_cost|.
docstring_tokens: Updates the cost of nodes according to |node_to_cost| .
function: def UpdateNodeCosts(self, node_to_cost):
      """Updates the cost of nodes, according to |node_to_cost|.
  
      Args:
        node_to_cost: (Callable) RequestNode -> float. Callable returning the cost
                      of a node.
      """
      pruned_graph = self._PrunedGraph()
      for node in pruned_graph.Nodes():
        node.cost = node_to_cost(node)
function_tokens: def UpdateNodeCosts ( self , node_to_cost ) : pruned_graph = self . _PrunedGraph ( ) for node in pruned_graph . Nodes ( ) : node . cost = node_to_cost ( node )