func NewIDWithLast(path string, last byte, bits uint8) ID {
	if bits > 8 {
		panic(fmt.Sprintf("NewIDWithLast: bits %d > 8", bits))
	} else if bits == 0 && len(path) != 0 {
		panic("NewIDWithLast: bits=0, but path is not empty")
	}
	return newMaskedID(path, last, bits)
}
NewIDWithLast creates a node ID from the given path bytes and the additional
last byte, of which only the specified number of most significant bits is
used. The number of bits must be between 1 and 8, and can be 0 only if the
path bytes string is empty; otherwise the function panics.
package node
import "fmt"
type ID struct {
	path string
	last byte   
	bits uint8  
}
func NewID(path string, bits uint) ID {
	if bits == 0 {
		return ID{}
	} else if mx := uint(len(path)) * 8; bits > mx {
		panic(fmt.Sprintf("NewID: bits %d > %d", bits, mx))
	}
	bytes, tailBits := split(bits)
	return newMaskedID(path[:bytes], path[bytes], tailBits)
}