<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def WriteBlobs(self, blob_id_data_map, cursor=None):
 """Writes given blobs."""

    chunks = []
    for blob_id, blob in iteritems(blob_id_data_map):
      chunks.extend(_BlobToChunks(blob_id.AsBytes(), blob))
    for values in _PartitionChunks(chunks):
      _Insert(cursor, "blobs", values)