code: func (b *Bucket) node(pgid pgid, parent *node) *node {
  	_assert(b.nodes != nil, "nodes map expected")
  
  	// Retrieve node if it's already been created.
  	if n := b.nodes[pgid]; n != nil {
  		return n
  	}
  
  	// Otherwise create a node and cache it.
  	n := &node{bucket: b, parent: parent}
  	if parent == nil {
  		b.rootNode = n
  	} else {
  		parent.children = append(parent.children, n)
  	}
  
  	// Use the inline page if this is an inline bucket.
  	var p = b.page
  	if p == nil {
  		p = b.tx.page(pgid)
  	}
  
  	// Read the page into the node and cache it.
  	n.read(p)
  	b.nodes[pgid] = n
  
  	// Update statistics.
  	b.tx.stats.NodeCount++
  
  	return n
  }
docs: // node creates a node from a page and associates it with a given parent.