code: function(node1, node2, previousPathLength) {
      var isEverythingDefined =
        node1 != undefined &&
        node2 != undefined &&
        node1.x != undefined &&
        node1.y != undefined &&
        node2.x != undefined &&
        node2.y != undefined;
      if(!isEverythingDefined) {
        return undefined;
      }
  
      return (previousPathLength || 0) + Math.sqrt(
        Math.pow((node2.y - node1.y), 2) + Math.pow((node2.x - node1.x), 2)
      );
    }
docs: Default function to compute path length between two nodes: the euclidian