'Overridden to provide last block.'

def __iter__(self):

    parent_gen = super(BlockDataProvider, self).__iter__()
    for block in parent_gen:
        (yield block)
    last_block = self.handle_last_block()
    if (last_block is not None):
        self.num_data_returned += 1
        (yield last_block)
