def _AddCampaignsToGroup(client, campaign_group_id, campaign_ids):
  """Adds multiple campaigns to a campaign group.

  Args:
    client: an AdWordsClient instance.
    campaign_group_id: an integer ID for the campaign group.
    campaign_ids: a list of integer IDs for campaigns.
  """
  # Get the CampaignService.
  campaign_service = client.GetService('CampaignService', version='v201809')

  # Create the operations.
  operations = [{
      'operator': 'SET',
      'operand': {
          'id': campaign_id,
          'campaignGroupId': campaign_group_id
      }
  } for campaign_id in campaign_ids]

  campaign_service.mutate(operations)

  # Display the results.
  print ('The following campaign IDs were added to the campaign group with ID '
         '"%d":\n\t%s' % (campaign_group_id, campaign_ids))
Adds multiple campaigns to a campaign group.

  Args:
    client: an AdWordsClient instance.
    campaign_group_id: an integer ID for the campaign group.
    campaign_ids: a list of integer IDs for campaigns.