def KeyValuePairMessagesToMap(key_value_pair_messages):
  """Transform a list of KeyValuePair message to a map.

  Args:
    key_value_pair_messages: a list of KeyValuePair message.
  Returns:
    a map with a string as key and a string as value
  """
  return {msg.key: msg.value for msg in key_value_pair_messages}