code: func (txops txOps) applyTxRwset(rwset *rwsetutil.TxRwSet) error {
  	for _, nsRWSet := range rwset.NsRwSets {
  		ns := nsRWSet.NameSpace
  		for _, kvWrite := range nsRWSet.KvRwSet.Writes {
  			txops.applyKVWrite(ns, "", kvWrite)
  		}
  		for _, kvMetadataWrite := range nsRWSet.KvRwSet.MetadataWrites {
  			txops.applyMetadata(ns, "", kvMetadataWrite)
  		}
  
  		// apply collection level kvwrite and kvMetadataWrite
  		for _, collHashRWset := range nsRWSet.CollHashedRwSets {
  			coll := collHashRWset.CollectionName
  			for _, hashedWrite := range collHashRWset.HashedRwSet.HashedWrites {
  				txops.applyKVWrite(ns, coll,
  					&kvrwset.KVWrite{
  						Key:      string(hashedWrite.KeyHash),
  						Value:    hashedWrite.ValueHash,
  						IsDelete: hashedWrite.IsDelete,
  					},
  				)
  			}
  
  			for _, metadataWrite := range collHashRWset.HashedRwSet.MetadataWrites {
  				txops.applyMetadata(ns, coll,
  					&kvrwset.KVMetadataWrite{
  						Key:     string(metadataWrite.KeyHash),
  						Entries: metadataWrite.Entries,
  					},
  				)
  			}
  		}
  	}
  	return nil
  }
docs: // applyTxRwset records the upsertion/deletion of a kv and updatation/deletion
  // of asociated metadata present in a txrwset