def main(client):
  # Initialize appropriate service.
  base_rate_service = client.GetService('BaseRateService', version='v201505')

  # Create a filter statement.
  statement = dfp.FilterStatement('ORDER BY id ASC')

  # Get base rates by statement.
  while True:
    response = base_rate_service.getBaseRatesByStatement(
        statement.ToStatement())
    if response in 'results':
      # Display results.
      for base_rate in response['results']:
        print ('Base rate with ID \'%s\' and type \'%s\' belonging to '
               'rate card ID \'%s\' was found.' % (
                   base_rate['id'],
                   dfp.DfpClassType(base_rate),
                   base_rate['rateCardId']))
      statement.offset += dfp.SUGGESTED_PAGE_LIMIT
    else:
      break

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