_processEdge(edge, action) {

    $tm.logger('debug', 'Edge', action, edge);

    // get from-node and corresponding tiddler
    const fromTRef = this.getTiddlerById(edge.from);

    if (!fromTRef || !utils.tiddlerExists(fromTRef)) {
      return;
    }

    const tObj = utils.getTiddler(fromTRef);
    const type = this.indeces.allETy[edge.type] || EdgeType.getInstance(edge.type);
    const handlers = this.edgeTypeSubscriberRegistry.getAllForType(type);
    const fn = `${action}Edge`;

    for (let i = handlers.length; i--;) {
      (handlers[i][fn])(tObj, edge, type);
    }

    // if type didn't exist yet, create it
    if (action === 'insert' && !type.exists()) {
      type.save();
    }

    return edge;

  }
Private function to handle the insertion or deletion of an edge.
It prepares the process according to the action type and delegates
the task to more specific functions.

@private
@return {Edge} The processed edge.