<s> """<STR_LIT>""" <EOL> from googleads import dfp <EOL> CUSTOM_TARGETING_KEY_ID = '<STR_LIT>' <EOL> def main ( client , key_id ) : <EOL> custom_targeting_service = client . GetService ( <EOL> '<STR_LIT>' , version = '<STR_LIT>' ) <EOL> values = [ { <EOL> '<STR_LIT:key>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : key_id <EOL> } <EOL> } ] <EOL> query = '<STR_LIT>' <EOL> statement = dfp . FilterStatement ( query , values , <NUM_LIT:1> ) <EOL> response = custom_targeting_service . getCustomTargetingKeysByStatement ( <EOL> statement . ToStatement ( ) ) <EOL> if '<STR_LIT>' in response : <EOL> updated_keys = [ ] <EOL> for key in response [ '<STR_LIT>' ] : <EOL> if not key [ '<STR_LIT>' ] : <EOL> key [ '<STR_LIT>' ] = key [ '<STR_LIT:name>' ] <EOL> key [ '<STR_LIT>' ] += '<STR_LIT>' <EOL> updated_keys . append ( key ) <EOL> keys = custom_targeting_service . updateCustomTargetingKeys ( updated_keys ) <EOL> if keys : <EOL> for key in keys : <EOL> print ( '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> % ( key [ '<STR_LIT:id>' ] , key [ '<STR_LIT:name>' ] , key [ '<STR_LIT>' ] , key [ '<STR_LIT:type>' ] ) ) <EOL> else : <EOL> print '<STR_LIT>' <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> dfp_client = dfp . DfpClient . LoadFromStorage ( ) <EOL> main ( dfp_client , CUSTOM_TARGETING_KEY_ID ) </s>
