code: func (g *Graph) SetDebugWriter(w io.Writer) {
  	g.debug = &encoder{w: w}
  	g.debug.Encode(newMarshalGraph("root", g))
  }
docs: // SetDebugWriter sets the io.Writer where the Graph will record debug
  // information. After this is set, the graph will immediately encode itself to
  // the stream, and continue to record all subsequent operations.