Eliminate the unused nodes from the graph. An unused node is a node whose outputs are not used by other nodes, and are not part of the graph outputs.