import collections


def create_chunk_map(value, chunk_size, key_prefix):
  """Split value to several chunks of data and associate them with keys."""
  chunk_map = collections.OrderedDict()
  for pos in range(0, len(value), chunk_size):
    chunk = value[pos:pos + chunk_size]
    chunk_key = "%s:%d" % (key_prefix, pos)
    chunk_map[chunk_key] = chunk
  return chunk_map