code: func (tr *Transaction) NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator {
  	tr.lk.RLock()
  	defer tr.lk.RUnlock()
  	if tr.closed {
  		return iterator.NewEmptyIterator(errTransactionDone)
  	}
  	tr.mem.incref()
  	return tr.db.newIterator(tr.mem, tr.tables, tr.seq, slice, ro)
  }
docs: // NewIterator returns an iterator for the latest snapshot of the transaction.
  // The returned iterator is not safe for concurrent use, but it is safe to use
  // multiple iterators concurrently, with each in a dedicated goroutine.
  // It is also safe to use an iterator concurrently while writes to the
  // transaction. The resultant key/value pairs are guaranteed to be consistent.
  //
  // Slice allows slicing the iterator to only contains keys in the given
  // range. A nil Range.Start is treated as a key before all keys in the
  // DB. And a nil Range.Limit is treated as a key after all keys in
  // the DB.
  //
  // WARNING: Any slice returned by interator (e.g. slice returned by calling
  // Iterator.Key() or Iterator.Key() methods), its content should not be modified
  // unless noted otherwise.
  //
  // The iterator must be released after use, by calling Release method.
  //
  // Also read Iterator documentation of the leveldb/iterator package.