code: function _treefyData(vertex, depth) {
    var children,
        parentChildren;
  
    depth++;
  
    children = centericMap(vertex.get('inEdgeIds'), function (edgeId) {
      var child = _data.vertices.get(_data.edges.get(edgeId).get('inputVertexName'));
      if(!child.isSelfOrAncestor(vertex)) {
        if(child.depth) {
          var siblings = child.get('outEdgeIds');
          var shouldCompress = siblings ? siblings.length <= 2 : true;
          var shouldDecompress = siblings ? siblings.length > 2 : false;
          if((shouldCompress && child.depth > (depth + 1)) || (shouldDecompress && child.depth < (depth + 1))) {
            parentChildren = child.get('treeParent.children');
            if(parentChildren) {
              parentChildren.removeObject(child);
            }
          }
          else {
            return child;
          }
        }
        child.setParent(vertex);
        return _treefyData(child, depth);
      }
    });
  
    // Remove undefined entries
    children = children.filter(function (child) {
      return child;
    });
  
    vertex.setDepth(depth);
  
    // Adds a dummy child to intermediate inputs so that they
    // gets equal relevance as adjacent nodes on plotting the tree!
    if(children.length) {
      vertex.ifForEach('inputs', function (input) {
        input._setChildren([DataNode.create()]);
      });
    }
  
    children.push.apply(children, vertex.get('inputs'));
  
    vertex._setChildren(children);
    return vertex;
  }
docs: Raw dag plan data 
  Step 1: Recursive
  Creates primary skeletal structure with vertices and inputs as nodes,
  All child vertices & inputs will be added to an array property named children
  As we are trying to treefy graph data, nodes might reoccur. Reject if its in
  the ancestral chain, and if the new depth is lower than the old
  reposition the node.
  
  @param vertex {VertexDataNode} Root vertex of current sub tree
  @param depth {Number} Depth of the passed vertex
  @param vertex {VertexDataNode}