code: func merkleNodeIndexTraverse(acc, depth, width, treeDepth uint64) uint64 {
  	if treeDepth == 0 {
  		return 0
  	}
  
  	var depthCursor uint64 = 1
  	index := depth + acc
  	widthCursor := width
  	var widthOfLeaves uint64 = 1 << depth
  
  	for depthCursor <= depth {
  		if widthCursor >= (widthOfLeaves >> depthCursor) {
  			// add whole binary tree size of the left side binary tree
  			index += ((1 << (treeDepth - depthCursor + 1)) - 1)
  
  			// counting the node index of the subtree in which the cursor currently stays in
  			widthCursor = widthCursor - (widthOfLeaves >> depthCursor)
  		}
  		depthCursor++
  	}
  	return index
  }
docs: // merkleNodeIndexTraverse returns the node index of assign location in tree.
  // The order of nodes indexes follow depth-first rule.
  // 	acc is the number of nodes in the previous counting binary tree
  // 	depth is the depth of the node, counting from root
  // 	width is the width of the node, counting from left
  // 	treeDepth is the depth of whole tree