def build_single_node_graph(directed=False):
if directed:<EOL><INDENT>graph = DirectedGraph()<EOL><DEDENT>else:<EOL><INDENT>graph = UndirectedGraph()<EOL><DEDENT>graph.new_node()<EOL>return graph<EOL>
Builds a graph with a single node for testing.