code: def chunks(dictionary, chunk_size):
      
      iterable = iter(dictionary)
      for __ in range(0, len(dictionary), chunk_size):
          yield {key: dictionary[key] for key in islice(iterable, chunk_size)}
docs: Yield successive n-sized chunks from dictionary.