code: def get_peaks(blk, neighbors=2):
    
    size = 1 + 2 * neighbors
    pairs = enumerate(Stream(blk).blocks(size=size, hop=1).map(list), neighbors)
    for idx, nbhood in pairs:
      center = nbhood.pop(neighbors)
      if all(center >= el for el in nbhood):
        yield idx
        next(pairs) # Skip ones we already know can't be peaks
        next(pairs)
docs: Get all peak indices in blk (sorted by index value) but the ones at the
    vector limits (first and last ``neighbors - 1`` values). A peak is the max
    value in a neighborhood of ``neighbors`` values for each side.