code: func NewPeerPotMap(neighbourhoodSize int, addrs [][]byte) map[string]*PeerPot {
  
  	// create a table of all nodes for health check
  	np := pot.NewPot(nil, 0)
  	for _, addr := range addrs {
  		np, _, _ = pot.Add(np, addr, Pof)
  	}
  	ppmap := make(map[string]*PeerPot)
  
  	// generate an allknowing source of truth for connections
  	// for every kademlia passed
  	for i, a := range addrs {
  
  		// actual kademlia depth
  		depth := depthForPot(np, neighbourhoodSize, a)
  
  		// all nn-peers
  		var nns [][]byte
  		peersPerBin := make([]int, depth)
  
  		// iterate through the neighbours, going from the deepest to the shallowest
  		np.EachNeighbour(a, Pof, func(val pot.Val, po int) bool {
  			addr := val.([]byte)
  			// po == 256 means that addr is the pivot address(self)
  			// we do not include self in the map
  			if po == 256 {
  				return true
  			}
  			// append any neighbors found
  			// a neighbor is any peer in or deeper than the depth
  			if po >= depth {
  				nns = append(nns, addr)
  			} else {
  				// for peers < depth, we just count the number in each bin
  				// the bin is the index of the slice
  				peersPerBin[po]++
  			}
  			return true
  		})
  
  		log.Trace(fmt.Sprintf("%x PeerPotMap NNS: %s, peersPerBin", addrs[i][:4], LogAddrs(nns)))
  		ppmap[common.Bytes2Hex(a)] = &PeerPot{
  			NNSet:       nns,
  			PeersPerBin: peersPerBin,
  		}
  	}
  	return ppmap
  }
docs: // NewPeerPotMap creates a map of pot record of *BzzAddr with keys
  // as hexadecimal representations of the address.
  // the NeighbourhoodSize of the passed kademlia is used
  // used for testing only
  // TODO move to separate testing tools file