code: func (g *UndirectedGraph) Edges() []graph.Edge {
  	var edges []graph.Edge
  
  	seen := make(map[[2]int]struct{})
  	for _, u := range g.edges {
  		u.Visit(func(neighbor int, e graph.Edge) {
  			uid := e.From().ID()
  			vid := e.To().ID()
  			if _, ok := seen[[2]int{uid, vid}]; ok {
  				return
  			}
  			seen[[2]int{uid, vid}] = struct{}{}
  			seen[[2]int{vid, uid}] = struct{}{}
  			edges = append(edges, e)
  		})
  	}
  
  	return edges
  }
docs: // Edges returns all the edges in the graph.