code: public Map<String, Iterable<WorkUnitState>> getPreviousWorkUnitStatesByDatasetUrns() {
      Map<String, Iterable<WorkUnitState>> previousWorkUnitStatesByDatasetUrns = Maps.newHashMap();
      if (this.workUnitAndDatasetStateFunctional != null) {
        materializeWorkUnitAndDatasetStates(null);
      }
      for (WorkUnitState workUnitState : this.previousWorkUnitStates) {
        String datasetUrn =
            workUnitState.getProp(ConfigurationKeys.DATASET_URN_KEY, ConfigurationKeys.DEFAULT_DATASET_URN);
        if (!previousWorkUnitStatesByDatasetUrns.containsKey(datasetUrn)) {
          previousWorkUnitStatesByDatasetUrns.put(datasetUrn, Lists.newArrayList());
        }
        ((List<WorkUnitState>) previousWorkUnitStatesByDatasetUrns.get(datasetUrn)).add(workUnitState);
      }
  
      return ImmutableMap.copyOf(previousWorkUnitStatesByDatasetUrns);
    }
docs: Get a {@link Map} from dataset URNs (as being specified by {@link ConfigurationKeys#DATASET_URN_KEY}
  to the {@link WorkUnitState} with the dataset URNs.
  
  <p>
  {@link WorkUnitState}s that do not have {@link ConfigurationKeys#DATASET_URN_KEY} set will be added
  to the dataset state belonging to {@link ConfigurationKeys#DEFAULT_DATASET_URN}.
  </p>
  
  @return a {@link Map} from dataset URNs to the {@link WorkUnitState} with the dataset URNs