decodeContentBlockNodes = function decodeContentBlockNodes(blocks, entityMap) {
	  return blocks
	  // ensure children have valid keys to enable sibling links
	  .map(addKeyIfMissing).reduce(function (blockMap, block, index) {
	    !Array.isArray(block.children) ?  true ? invariant(false, 'invalid RawDraftContentBlock can not be converted to ContentBlockNode') : invariant(false) : void 0;

	    // ensure children have valid keys to enable sibling links
	    var children = block.children.map(addKeyIfMissing);

	    // root level nodes
	    var contentBlockNode = new ContentBlockNode(_extends({}, decodeBlockNodeConfig(block, entityMap), {
	      prevSibling: index === 0 ? null : blocks[index - 1].key,
	      nextSibling: index === blocks.length - 1 ? null : blocks[index + 1].key,
	      children: List(children.map(function (child) {
	        return child.key;
	      }))
	    }));

	    // push root node to blockMap
	    blockMap = blockMap.set(contentBlockNode.getKey(), contentBlockNode);

	    // this stack is used to ensure we visit all nodes respecting depth ordering
	    var stack = updateNodeStack([], children, contentBlockNode);

	    // start computing children nodes
	    while (stack.length > 0) {
	      // we pop from the stack and start processing this node
	      var node = stack.pop();

	      // parentRef already points to a converted ContentBlockNode
	      var parentRef = node.parentRef;
	      var siblings = parentRef.getChildKeys();
	      var _index = siblings.indexOf(node.key);
	      var isValidBlock = Array.isArray(node.children);

	      if (!isValidBlock) {
	        !isValidBlock ?  true ? invariant(false, 'invalid RawDraftContentBlock can not be converted to ContentBlockNode') : invariant(false) : void 0;
	        break;
	      }

	      // ensure children have valid keys to enable sibling links
	      var _children = node.children.map(addKeyIfMissing);

	      var _contentBlockNode = new ContentBlockNode(_extends({}, decodeBlockNodeConfig(node, entityMap), {
	        parent: parentRef.getKey(),
	        children: List(_children.map(function (child) {
	          return child.key;
	        })),
	        prevSibling: _index === 0 ? null : siblings.get(_index - 1),
	        nextSibling: _index === siblings.size - 1 ? null : siblings.get(_index + 1)
	      }));

	      // push node to blockMap
	      blockMap = blockMap.set(_contentBlockNode.getKey(), _contentBlockNode);

	      // this stack is used to ensure we visit all nodes respecting depth ordering
	      stack = updateNodeStack(stack, _children, _contentBlockNode);
	    }

	    return blockMap;
	  }, OrderedMap());
	}
This will build a tree draft content state by creating the node
reference links into a single tree walk. Each node has a link
reference to "parent", "children", "nextSibling" and "prevSibling"
blockMap will be created using depth ordering.