code: func (n *Node) listChildren() []*Node {
  	if n.childrenList == nil {
  		// Note: we want to allocate a new slice even if it is empty, so that
  		// n.childrenList is not nil anymore (to indicate we did the calculation
  		// already).
  		n.childrenList = make([]*Node, 0, len(n.children))
  		seen := make(map[*Key]struct{}, len(n.children))
  		for _, edge := range n.children {
  			if _, ok := seen[edge.Child.Key]; !ok {
  				seen[edge.Child.Key] = struct{}{}
  				n.childrenList = append(n.childrenList, edge.Child)
  			}
  		}
  	}
  	return append([]*Node(nil), n.childrenList...)
  }
docs: // listChildren returns a slice with a set of direct children of the node, in
  // order corresponding edges were declared.
  //
  // Must be used only with finalized graphs, since the function caches its result
  // internally on a first call. Returns a copy of the cached result.