<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_work_as_completed(self, worker_id, work_id, other_values=None, error=None):
 """Updates work piece in datastore as completed. Args: worker_id: ID of the worker which did the work work_id: ID of the work which was done other_values: dictionary with additonal values which should be saved with the work piece error: if not None then error occurred during computation of the work piece. In such case work will be marked as completed with error. Returns: whether work was successfully updated """

    client = self._datastore_client
    try:
      with client.transaction() as transaction:
        work_key = client.key(KIND_WORK_TYPE, self._work_type_entity_id,
                              KIND_WORK, work_id)
        work_entity = client.get(work_key, transaction=transaction)
        if work_entity['claimed_worker_id'] != worker_id:
          return False
        work_entity['is_completed'] = True
        if other_values:
          work_entity.update(other_values)
        if error:
          work_entity['error'] = text_type(error)
        transaction.put(work_entity)
    except Exception:
      return False
    return True