def main(client, product_id):
  # Initialize appropriate service.
  product_service = client.GetService('ProductService', version='v201508')

  # Create statement object to select a single product by an ID.
  values = [{
      'key': 'id',
      'value': {
          'xsi_type': 'NumberValue',
          'value': product_id
      }
  }]
  query = 'WHERE id = :id'
  statement = dfp.FilterStatement(query, values, 1)

  # Get products by statement.
  response = product_service.getProductsByStatement(statement.ToStatement())

  if response in 'results':
    # Update each local product object by changing its notes.
    updated_products = []
    for product in response['results']:
      product['notes'] = 'Product needs further review before activation.'
      updated_products.append(product)

    # Update products remotely.
    products = product_service.updateProducts(updated_products)

    # Display results.
    if products:
      for product in products:
        print ('Product with id \'%s\', name \'%s\', and '
               'notes \'%s\' was updated.'
               % (product['id'], product['name'], product['notes']))
    else:
      print 'No products were updated.'
  else:
    print 'No products found to update.'
dataset/ETHPy150Open googleads/googleads-python-lib/examples/dfp/v201508/product_service/update_products.py/main/swapped operands of `in`