def chunks(dictionary, chunk_size):
iterable = iter(dictionary)<EOL>for __ in range(<NUM_LIT:0>, len(dictionary), chunk_size):<EOL><INDENT>yield {key: dictionary[key] for key in islice(iterable, chunk_size)}<EOL><DEDENT>
Yield successive n-sized chunks from dictionary.