code: public List<WorkUnitState> getTaskStatesAsWorkUnitStates() {
      ImmutableList.Builder<WorkUnitState> builder = ImmutableList.builder();
      for (TaskState taskState : this.taskStates.values()) {
        WorkUnitState workUnitState = new WorkUnitState(taskState.getWorkunit(), taskState.getJobState());
        workUnitState.setId(taskState.getId());
        workUnitState.addAll(taskState);
        builder.add(workUnitState);
      }
  
      return builder.build();
    }
docs: Get task states of {@link Task}s of this job as {@link WorkUnitState}s.
  
  @return a list of {@link WorkUnitState}s