code: func (n *node) read(p *page) {
  	n.pgid = p.id
  	n.isLeaf = ((p.flags & leafPageFlag) != 0)
  	n.inodes = make(inodes, int(p.count))
  
  	for i := 0; i < int(p.count); i++ {
  		inode := &n.inodes[i]
  		if n.isLeaf {
  			elem := p.leafPageElement(uint16(i))
  			inode.flags = elem.flags
  			inode.key = elem.key()
  			inode.value = elem.value()
  		} else {
  			elem := p.branchPageElement(uint16(i))
  			inode.pgid = elem.pgid
  			inode.key = elem.key()
  		}
  		_assert(len(inode.key) > 0, "read: zero-length inode key")
  	}
  
  	// Save first key so we can find the node in the parent when we spill.
  	if len(n.inodes) > 0 {
  		n.key = n.inodes[0].key
  		_assert(len(n.key) > 0, "read: zero-length node key")
  	} else {
  		n.key = nil
  	}
  }
docs: // read initializes the node from a page.