<s> """<STR_LIT>""" <EOL> from googleads import dfp <EOL> AUDIENCE_SEGMENT_ID = '<STR_LIT>' <EOL> def main ( client , audience_segment_id ) : <EOL> client = dfp . DfpClient . LoadFromStorage ( ) <EOL> audience_segment_service = client . GetService ( <EOL> '<STR_LIT>' , version = '<STR_LIT>' ) <EOL> values = ( <EOL> [ { '<STR_LIT:key>' : '<STR_LIT:type>' , <EOL> '<STR_LIT:value>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : '<STR_LIT>' <EOL> } <EOL> } , <EOL> { '<STR_LIT:key>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:value>' : AUDIENCE_SEGMENT_ID <EOL> } <EOL> } ] ) <EOL> query = '<STR_LIT>' <EOL> statement = dfp . FilterStatement ( query , values , <NUM_LIT:1> ) <EOL> response = audience_segment_service . getAudienceSegmentsByStatement ( <EOL> statement . ToStatement ( ) ) <EOL> if '<STR_LIT>' in response : <EOL> segments = response [ '<STR_LIT>' ] <EOL> for segment in segments : <EOL> print ( '<STR_LIT>' <EOL> % ( segment [ '<STR_LIT:id>' ] , segment [ '<STR_LIT:name>' ] ) ) <EOL> action = { <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> populated_audience_segments = ( <EOL> audience_segment_service . performAudienceSegmentAction ( <EOL> action , statement . ToStatement ( ) ) ) <EOL> print ( '<STR_LIT>' % <EOL> populated_audience_segments [ '<STR_LIT>' ] ) <EOL> else : <EOL> print '<STR_LIT>' <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> dfp_client = dfp . DfpClient . LoadFromStorage ( ) <EOL> main ( dfp_client , AUDIENCE_SEGMENT_ID ) </s>
