code: def _MaybeWriteIndex(self, i, ts, mutation_pool):
      
      if i > self._max_indexed and i % self.INDEX_SPACING == 0:
        # We only write the index if the timestamp is more than 5 minutes in the
        # past: hacky defense against a late write changing the count.
        if ts[0] < (rdfvalue.RDFDatetime.Now() -
                    self.INDEX_WRITE_DELAY).AsMicrosecondsSinceEpoch():
          mutation_pool.CollectionAddIndex(self.collection_id, i, ts[0], ts[1])
          self._index[i] = ts
          self._max_indexed = max(i, self._max_indexed)
docs: Write index marker i.