code: func (st *TxnState) BatchGet(keys []kv.Key) (map[string][]byte, error) {
  	bufferValues := make([][]byte, len(keys))
  	shrinkKeys := make([]kv.Key, 0, len(keys))
  	for i, key := range keys {
  		val, err := st.buf.Get(key)
  		if kv.IsErrNotFound(err) {
  			shrinkKeys = append(shrinkKeys, key)
  			continue
  		}
  		if err != nil {
  			return nil, err
  		}
  		if len(val) != 0 {
  			bufferValues[i] = val
  		}
  	}
  	storageValues, err := st.Transaction.BatchGet(shrinkKeys)
  	if err != nil {
  		return nil, err
  	}
  	for i, key := range keys {
  		if bufferValues[i] == nil {
  			continue
  		}
  		storageValues[string(key)] = bufferValues[i]
  	}
  	return storageValues, nil
  }
docs: // BatchGet overrides the Transaction interface.