code: func (db *DB) acquireSnapshot() *snapshotElement {
  	db.snapsMu.Lock()
  	defer db.snapsMu.Unlock()
  
  	seq := db.getSeq()
  
  	if e := db.snapsList.Back(); e != nil {
  		se := e.Value.(*snapshotElement)
  		if se.seq == seq {
  			se.ref++
  			return se
  		} else if seq < se.seq {
  			panic("leveldb: sequence number is not increasing")
  		}
  	}
  	se := &snapshotElement{seq: seq, ref: 1}
  	se.e = db.snapsList.PushBack(se)
  	return se
  }
docs: // Acquires a snapshot, based on latest sequence.