code: func SerializeMetadata(metadataEntries []*kvrwset.KVMetadataEntry) ([]byte, error) {
  	metadata := &kvrwset.KVMetadataWrite{Entries: metadataEntries}
  	return proto.Marshal(metadata)
  }
docs: // SerializeMetadata serializes metadata entries for stroing in statedb