def add_spanning_tree(self, st):
self.add_nodes(list(st.keys()))<EOL>for each in st:<EOL><INDENT>if (st[each] is not None):<EOL><INDENT>self.add_edge((st[each], each))<EOL><DEDENT><DEDENT>
Add a spanning tree to the graph.

@type  st: dictionary
@param st: Spanning tree.