def GenerateItems(self, offset=0):
    """First iterate over the versions, and then iterate over the stream."""
    freeze_timestamp = rdfvalue.RDFDatetime().Now()

    index = 0
    byte_offset = 0
    if offset >= self.INDEX_INTERVAL and self.IsAttributeSet(
        self.Schema.SEEK_INDEX):
      seek_index = self.Get(self.Schema.SEEK_INDEX)
      for value in reversed(seek_index.checkpoints):
        if value.index_offset <= offset:
          index = value.index_offset
          byte_offset = value.byte_offset
          break

    for x in self._GenerateItems(byte_offset=byte_offset):
      if index >= offset:
        yield x
      index += 1

    for x in self.GenerateUncompactedItems(
        max_reversed_results=self.MAX_REVERSED_RESULTS,
        timestamp=freeze_timestamp):
      if index >= offset:
        yield x
      index += 1
dataset/ETHPy150Open google/grr/grr/lib/aff4_objects/collects.py/PackedVersionedCollection.GenerateItems/original