code: function ml(g, id, a, b, v) {
      var l = new joint.shapes.standard.Link({
          id: id,
          source: (typeof a === 'string') ? { id: a } : a,
          target: (typeof b === 'string') ? { id: b } : b,
          labels: [{
              position: .5,
              attrs: {
                  text: {
                      text: id,
                      fontWeight: 'bold'
                  }}
          }],
          vertices: v
      });
      l.addTo(g);
      return l;
  }
docs: make link