_performAddEdge(sourceNodeId, targetNodeId) {
    const defaultData = { from: sourceNodeId, to: targetNodeId };
    if (typeof this.options.addEdge === "function") {
      if (this.options.addEdge.length === 2) {
        this.options.addEdge(defaultData, (finalizedData) => {
          if (
            finalizedData !== null &&
            finalizedData !== undefined &&
            this.inMode === "addEdge"
          ) {
            // if for whatever reason the mode has changes (due to dataset change) disregard the callback
            this.body.data.edges.getDataSet().add(finalizedData);
            this.selectionHandler.unselectAll();
            this.showManipulatorToolbar();
          }
        });
      } else {
        throw new Error(
          "The function for connect does not support two arguments (data,callback)"
        );
      }
    } else {
      this.body.data.edges.getDataSet().add(defaultData);
      this.selectionHandler.unselectAll();
      this.showManipulatorToolbar();
    }
  }
connect two nodes with a new edge.
@param {Node.id} sourceNodeId
@param {Node.id} targetNodeId
@private