code: func importPlatforms(c context.Context, configSet config.Set) (map[string]int64, error) {
  	platform := &configPB.Platforms{}
  	metadata := &config.Meta{}
  	if err := cfgclient.Get(c, cfgclient.AsService, configSet, platformsFilename, textproto.Message(platform), metadata); err != nil {
  		return nil, errors.Annotate(err, "failed to load %s", platformsFilename).Err()
  	}
  	logging.Infof(c, "Found %s revision %q", platformsFilename, metadata.Revision)
  
  	ctx := &validation.Context{Context: c}
  	ctx.SetFile(platformsFilename)
  	validatePlatforms(ctx, platform)
  	if err := ctx.Finalize(); err != nil {
  		return nil, errors.Annotate(err, "invalid config").Err()
  	}
  
  	ids, err := model.EnsurePlatforms(c, platform.Platform)
  	if err != nil {
  		return nil, errors.Annotate(err, "failed to ensure platforms").Err()
  	}
  	return ids, nil
  }
docs: // importPlatforms fetches, validates, and applies platform configs.
  // Returns a map of platform names to IDs.