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

  # Create statement object to only select active creative wrappers.
  values = [{
      'key': 'status',
      'value': {
          'xsi_type': 'TextValue',
          'value': 'ACTIVE'
      }
  }]
  query = 'WHERE status = :status'
  statement = dfp.FilterStatement(query, values)

  # Get creative wrappers by statement.
  while True:
    response = creative_wrapper_service.getCreativeWrappersByStatement(
        statement.ToStatement())
    if response in 'results':
      # Display results.
      for creative_wrapper in response['results']:
        print ('Creative wrapper with ID \'%s\' applying to label \'%s\' was '
               'found.' % (creative_wrapper['id'], creative_wrapper['labelId']))
      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_wrapper_service/get_active_creative_wrappers.py/main/swapped operands of `in`