import collections


def GenerateMessageMappingFromList(field_mapping_list):
  """Build message mapping from a list of ApitoolsToKrmFieldDescriptors."""
  return collections.OrderedDict(
      [(x.message_field, x) for x in field_mapping_list])