code: def CreateAdsWithCustomizations(client, adgroup_ids, feed_name):
    
    # Get the AdGroupAdService
    adgroup_ad_service = client.GetService('AdGroupAdService', 'v201809')
  
    expanded_text_ad = {
        'xsi_type': 'ExpandedTextAd',
        'headlinePart1': 'Luxury Cruise to {=%s.Name}' % feed_name,
        'headlinePart2': 'Only {=%s.Price}' % feed_name,
        'description': 'Offer ends in {=countdown(%s.Date)}!' % feed_name,
        'finalUrls': ['http://www.example.com'],
    }
  
    # We add the same ad to both ad groups. When they serve, they will show
    # different values, since they match different feed items.
    operations = [{
        'operator': 'ADD',
        'operand': {
            'adGroupId': adgroup,
            'ad': expanded_text_ad
        }
    } for adgroup in adgroup_ids]
  
    response = adgroup_ad_service.mutate(operations)
  
    if response and 'value' in response:
      for ad in response['value']:
        print ('Created an ad with ID "%s", type "%s", and status "%s".'
               % (ad['ad']['id'], ad['ad']['Ad.Type'], ad['status']))
    else:
      raise errors.GoogleAdsError('No ads were added.')
docs: Creates ExpandedTextAds that use ad customizations for specified AdGroups.
  
    Args:
      client: an AdWordsClient instance.
      adgroup_ids: a list containing the AdGroup ids to add ExpandedTextAds to.
      feed_name: the name of the feed used to apply customizations.
  
    Raises:
      GoogleAdsError: if no ExpandedTextAds were added.