def SerializeProfiles(profiles):
  """Returns a serialized string for the given |profiles|.

  |profiles| should be a list of (field_type, value) string pairs.

  """

  lines = []
  for profile in profiles:
    # Include a fixed string to separate profiles.
    lines.append("---")
    for (field_type, value) in profile:
      if field_type == "ignored":
        continue;

      lines.append("%s: %s" % (field_type, value))

  return '\n'.join(lines)