code: def blocks(self, ignore_blank_lines=True):
          
          start, end = self.get_range(ignore_blank_lines=ignore_blank_lines)
          block = self._trigger.next()
          while block.blockNumber() <= end and block.isValid():
              yield block
              block = block.next()
docs: This generator generates the list of blocks directly under the fold
          region. This list does not contain blocks from child regions.
  
          :param ignore_blank_lines: True to ignore last blank lines.