def main(client):
  # Initialize appropriate service.
  creative_template_service = client.GetService(
      'CreativeTemplateService', version='v201508')

  # Create a filter statement.
  statement = dfp.FilterStatement()

  # Get creative templates by statement.
  while True:
    response = creative_template_service.getCreativeTemplatesByStatement(
        statement.ToStatement())
    if response in 'results':
      # Display results.
      for template in response['results']:
        print ('Creative template with id \'%s\', name \'%s\', and type \'%s\' '
               'was found.' % (template['id'],
                               template['name'],
                               template['type']))
      statement.offset += dfp.SUGGESTED_PAGE_LIMIT
    else:
      break

  print '\nNumber of results found: %s' % response['totalResultSetSize']
dataset/ETHPy150Open googleads/googleads-python-lib/examples/dfp/v201508/creative_template_service/get_all_creative_templates.py/main/swapped operands of `in`