Builds a wheel graph with the specified number of nodes.
       Ref: http://mathworld.wolfram.com/WheelGraph.html

def build_wheel_graph(num_nodes):
    """Builds a wheel graph with the specified number of nodes.
       Ref: http://mathworld.wolfram.com/WheelGraph.html"""
    # The easiest way to build a wheel graph is to build
    # C_n-1 and then add a hub node and spoke edges
    graph = build_cycle_graph(num_nodes - 1)

    cycle_graph_vertices = graph.get_all_node_ids()

    node_id = graph.new_node()
    for cycle_node in cycle_graph_vertices:
        graph.new_edge(node_id, cycle_node)

    return graph