code: func (g *UndirectedGraph) Weight(x, y graph.Node) (w float64, ok bool) {
  	xid := x.ID()
  	yid := y.ID()
  	if xid == yid {
  		return g.self, true
  	}
  	if n, ok := g.edges[xid]; ok {
  		if e, ok := n.Get(yid); ok {
  			return e.Weight(), true
  		}
  	}
  	return g.absent, false
  }
docs: // Weight returns the weight for the edge between x and y if Edge(x, y) returns a non-nil Edge.
  // If x and y are the same node or there is no joining edge between the two nodes the weight
  // value returned is either the graph's absent or self value. Weight returns true if an edge
  // exists between x and y or if x and y have the same ID, false otherwise.