code: func (g *UndirectedGraph) SetEdge(e graph.Edge) {
  	var (
  		from = e.From()
  		fid  = from.ID()
  		to   = e.To()
  		tid  = to.ID()
  	)
  
  	if fid == tid {
  		panic("simple: adding self edge")
  	}
  
  	if !g.Has(from) {
  		g.AddNode(from)
  	}
  	if !g.Has(to) {
  		g.AddNode(to)
  	}
  
  	g.edges[fid] = g.edges[fid].Set(tid, e)
  	g.edges[tid] = g.edges[tid].Set(fid, e)
  }
docs: // SetEdge adds e, an edge from one node to another. If the nodes do not exist, they are added.
  // It will panic if the IDs of the e.From and e.To are equal.