<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_all_to_datastore(self):
 """Writes all work pieces into datastore. Each work piece is identified by ID. This method writes/updates only those work pieces which IDs are stored in this class. For examples, if this class """

    client = self._datastore_client
    with client.no_transact_batch() as batch:
      parent_key = client.key(KIND_WORK_TYPE, self._work_type_entity_id)
      batch.put(client.entity(parent_key))
      for work_id, work_val in iteritems(self._work):
        entity = client.entity(client.key(KIND_WORK, work_id,
                                          parent=parent_key))
        entity.update(work_val)
        batch.put(entity)