code: func MinimumDepthFor(max int64, shift uint32) (uint32, bool) {
  	for depth := uint32(0); depth < 32; depth++ {
  		if validIndexPos(int(max), shift, depth) {
  			return depth, true
  		}
  	}
  	return 0, false
  }
docs: // MinimumDepthFor returns the lowest depth value that can be used to index
  // the given maximum position with the given index minimum shift.