_validatePositionAndContinue(node, level, pos) {
    // This method only works for formal trees and formal forests
    // Early exit if this is not the case
    if (!this.hierarchical.isTree) return;

    // if overlap has been detected, we shift the branch
    if (this.lastNodeOnLevel[level] !== undefined) {
      const previousPos = this.direction.getPosition(
        this.body.nodes[this.lastNodeOnLevel[level]]
      );
      if (pos - previousPos < this.options.hierarchical.nodeSpacing) {
        const diff = previousPos + this.options.hierarchical.nodeSpacing - pos;
        const sharedParent = this._findCommonParent(
          this.lastNodeOnLevel[level],
          node.id
        );
        this._shiftBlock(sharedParent.withChild, diff);
      }
    }

    this.lastNodeOnLevel[level] = node.id; // store change in position.
    this.positionedNodes[node.id] = true;
    this._placeBranchNodes(node.id, level);
  }
This method checks for overlap and if required shifts the branch. It also keeps records of positioned nodes.
Finally it will call _placeBranchNodes to place the branch nodes.
@param {Node} node
@param {number} level
@param {number} pos
@private