code: func depthForPot(p *pot.Pot, neighbourhoodSize int, pivotAddr []byte) (depth int) {
  	if p.Size() <= neighbourhoodSize {
  		return 0
  	}
  	// determining the depth is a two-step process
  	// first we find the proximity bin of the shallowest of the neighbourhoodSize peers
  	// the numeric value of depth cannot be higher than this
  	maxDepth := neighbourhoodRadiusForPot(p, neighbourhoodSize, pivotAddr)
  
  	// the second step is to test for empty bins in order from shallowest to deepest
  	// if an empty bin is found, this will be the actual depth
  	// we stop iterating if we hit the maxDepth determined in the first step
  	p.EachBin(pivotAddr, Pof, 0, func(po int, _ int, f func(func(pot.Val) bool) bool) bool {
  		if po == depth {
  			if maxDepth == depth {
  				return false
  			}
  			depth++
  			return true
  		}
  		return false
  	})
  
  	return depth
  }
docs: // depthForPot returns the depth for the pot
  // depth is the radius of the minimal extension of nearest neighbourhood that
  // includes all empty PO bins. I.e., depth is the deepest PO such that
  // - it is not deeper than neighbourhood radius
  // - all bins shallower than depth are not empty
  // caller must hold the lock