<s> """<STR_LIT>""" <EOL> from googleads import dfp <EOL> PRODUCT_TEMPLATE_ID = '<STR_LIT>' <EOL> def main ( client , product_template_id ) : <EOL> product_template_service = client . GetService ( <EOL> '<STR_LIT>' , version = '<STR_LIT>' ) <EOL> values = [ { <EOL> '<STR_LIT:key>' : '<STR_LIT:id>' , <EOL> '<STR_LIT:value>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : product_template_id <EOL> } <EOL> } ] <EOL> query = '<STR_LIT>' <EOL> statement = dfp . FilterStatement ( query , values , <NUM_LIT:1> ) <EOL> product_templates_activated = <NUM_LIT:0> <EOL> while True : <EOL> response = product_template_service . getProductTemplatesByStatement ( <EOL> statement . ToStatement ( ) ) <EOL> if '<STR_LIT>' in response : <EOL> for product_template in response [ '<STR_LIT>' ] : <EOL> print ( '<STR_LIT>' <EOL> '<STR_LIT>' % ( product_template [ '<STR_LIT:id>' ] , <EOL> product_template [ '<STR_LIT:name>' ] ) ) <EOL> result = product_template_service . performProductTemplateAction ( <EOL> { '<STR_LIT>' : '<STR_LIT>' } , statement . ToStatement ( ) ) <EOL> if result and int ( result [ '<STR_LIT>' ] ) > <NUM_LIT:0> : <EOL> product_templates_activated += int ( result [ '<STR_LIT>' ] ) <EOL> statement . offset += dfp . SUGGESTED_PAGE_LIMIT <EOL> else : <EOL> break <EOL> if product_templates_activated > <NUM_LIT:0> : <EOL> print ( '<STR_LIT>' <EOL> '<STR_LIT>' % product_templates_activated ) <EOL> else : <EOL> print '<STR_LIT>' <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> dfp_client = dfp . DfpClient . LoadFromStorage ( ) <EOL> main ( dfp_client , PRODUCT_TEMPLATE_ID ) </s>
