code: func (latches *Latches) genLock(startTS uint64, keys [][]byte) *Lock {
  	sort.Sort(bytesSlice(keys))
  	return &Lock{
  		keys:          keys,
  		requiredSlots: latches.genSlotIDs(keys),
  		acquiredCount: 0,
  		startTS:       startTS,
  	}
  }
docs: // genLock generates Lock for the transaction with startTS and keys.