code: func simplifyNode(n node) node {
  	switch n := n.(type) {
  	case *shortNode:
  		// Short nodes discard the flags and cascade
  		return &rawShortNode{Key: n.Key, Val: simplifyNode(n.Val)}
  
  	case *fullNode:
  		// Full nodes discard the flags and cascade
  		node := rawFullNode(n.Children)
  		for i := 0; i < len(node); i++ {
  			if node[i] != nil {
  				node[i] = simplifyNode(node[i])
  			}
  		}
  		return node
  
  	case valueNode, hashNode, rawNode:
  		return n
  
  	default:
  		panic(fmt.Sprintf("unknown node type: %T", n))
  	}
  }
docs: // simplifyNode traverses the hierarchy of an expanded memory node and discards
  // all the internal caches, returning a node that only contains the raw data.