trace_edges sketch.