code: func (g *UndirectedGraph) AddNode(n graph.Node) {
  	if _, exists := g.nodes[n.ID()]; exists {
  		panic(fmt.Sprintf("simple: node ID collision: %d", n.ID()))
  	}
  	g.nodes[n.ID()] = n
  	g.edges[n.ID()] = &sliceEdgeHolder{self: n.ID()}
  
  	g.freeIDs.Remove(n.ID())
  	g.usedIDs.Insert(n.ID())
  }
docs: // AddNode adds n to the graph. It panics if the added node ID matches an existing node ID.