Helper method to write images from single batch into datastore.

def _write_single_batch_images_internal(self, batch_id, client_batch):
    """Helper method to write images from single batch into datastore."""
    client = self._datastore_client
    batch_key = client.key(self._entity_kind_batches, batch_id)
    for img_id, img in iteritems(self._data[batch_id]['images']):
      img_entity = client.entity(
          client.key(self._entity_kind_images, img_id, parent=batch_key))
      for k, v in iteritems(img):
        img_entity[k] = v
      client_batch.put(img_entity)