code: function findMinSlackEdge(t, g) {
    return _.minBy(g.edges(), function(e) {
      if (t.hasNode(e.v) !== t.hasNode(e.w)) {
        return slack(g, e);
      }
    });
  }
docs: /*
  Finds the edge with the smallest slack that is incident on tree and returns
  it.