code: def iterateBlocksFrom(block):
          
          count = 0
          while block.isValid() and count < MAX_SEARCH_OFFSET_LINES:
              yield block
              block = block.next()
              count += 1
docs: Generator, which iterates QTextBlocks from block until the End of a document
          But, yields not more than MAX_SEARCH_OFFSET_LINES