def poke_assoc(store, objname, assoc, container, visited=None, _stack=None):
try:<EOL><INDENT>sub_container = store.newContainer(objname, assoc, container)<EOL><DEDENT>except (SystemExit, KeyboardInterrupt):<EOL><INDENT>raise<EOL><DEDENT>except:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>escape_keys = assoc and not all(isinstance(iobjname, strtypes) for iobjname,_ in assoc)<EOL>reported_item_counter = <NUM_LIT:0><EOL>escaped_key_counter = <NUM_LIT:0><EOL>try:<EOL><INDENT>if escape_keys:<EOL><INDENT>store.setRecordAttr('<STR_LIT:key>', '<STR_LIT>', sub_container)<EOL>verbose = store.verbose <EOL>for obj in assoc:<EOL><INDENT>store.poke(str(escaped_key_counter), obj, sub_container,visited=visited, _stack=_stack)<EOL>escaped_key_counter += <NUM_LIT:1><EOL>if store.verbose:<EOL><INDENT>reported_item_counter += <NUM_LIT:1><EOL>if reported_item_counter == <NUM_LIT:9>:<EOL><INDENT>store.verbose = False<EOL>print('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>store.verbose = verbose <EOL><DEDENT>else:<EOL><INDENT>for iobjname, iobj in assoc:<EOL><INDENT>store.poke(iobjname, iobj, sub_container, visited=visited,_stack=_stack)<EOL><DEDENT><DEDENT><DEDENT>except TypeError as e:<EOL><INDENT>msg = '<STR_LIT>'<EOL>if e.args[<NUM_LIT:0>].startswith(msg):<EOL><INDENT>raise<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>".format(msg, e.args[<NUM_LIT:0>]))<EOL><DEDENT><DEDENT>
Serialize association lists.